第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

Spring Cloud Netflix Zuul。SQLSyntaxErrorException:

Spring Cloud Netflix Zuul。SQLSyntaxErrorException:

MM們 2023-06-28 15:35:55
我正在嘗試使用 JPA 存儲(chǔ)庫(kù)在 Spring Cloud Netflix Zuul 中配置速率限制。但是一開(kāi)始我收到這個(gè)異常:java.sql.SQLSyntaxErrorException:表“kirillbq_bl_acc.rate”不存在我的application.yaml:zuul:  routes:    my-service:      path: /  ratelimit:    enabled: true    repository: JPA    policy-list:      my-service:        - limit: 2          refresh-interval: 60          type:            - origin  strip-prefix: true我在項(xiàng)目中也有spring-boot-starter-data-jpa依賴(lài)項(xiàng)。我假設(shè) Zuul 需要一個(gè)“Rate”表來(lái)存儲(chǔ)有關(guān)請(qǐng)求的信息,但是我找不到有關(guān)該表結(jié)構(gòu)的任何信息。應(yīng)該是什么?
查看完整描述

1 回答

?
萬(wàn)千封印

TA貢獻(xiàn)1891條經(jīng)驗(yàn) 獲得超3個(gè)贊

我找到了此信息:https://www.programcreek.com/java-api-examples/ ?code=marcosbarbero/spring-cloud-zuul-ratelimit/spring-cloud-zuul-ratelimit-master/spring-cloud-zuul -ratelimit-core/src/main/java/com/marcosbarbero/cloud/autoconfigure/zuul/ratelimit/RateLimitAutoConfiguration.java#


config文件夾中有Rate.java類(lèi),其結(jié)構(gòu)為“Rate”表:


@Entity

public class Rate {


    @Id

    private String key;

    private Long remaining;

    private Long remainingQuota;

    private Long reset;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy HH:mm:ss")

    private Date expiration;


    // constructor, getters and setters 

}

創(chuàng)建此表后,一切正常。Zuul在此表中保存有關(guān)請(qǐng)求的信息。


查看完整回答
反對(duì) 回復(fù) 2023-06-28
  • 1 回答
  • 0 關(guān)注
  • 184 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)