- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 JPA 存储库在我的 Spring Cloud Netflix Zuul 中配置速率限制。但是一开始我收到这个异常:
java.sql.SQLSyntaxErrorException: Table 'kirillbq_bl_acc.rate' doesn't exist
我的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
我在项目中也有一个 spring-boot-starter-data-jpa 依赖项。
我假设 Zuul 需要一个'Rate' 表来存储有关请求的信息,但是我找不到有关该表结构的任何信息。应该是什么?
最佳答案
config文件夹中有Rate.java类,其结构为“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
}
创建此表后,一切正常。 Zuul在此表中保存有关请求的信息。
关于java - Spring Cloud Netflix Zuul。 SQLSyntaxErrorException : Table 'rate' doesn't exist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57707876/
首先,我创建了一个 2 sql 表,一个正在运行,另一个不是我的 java 类中的代码 try { Prepared
我正在尝试使用Where 子句来过滤掉空实体。 即 @Where(clause = "size(userTracking) > 0 OR size(userResults) > 0") 在 @One
我在 phpMyAdmin 中设置了数据库,在下面的查询中,我尝试更新包含某些软件的文件路径的字符串字段,例如“C:\Program Files (x86)\Kaspersky Lab\Kaspers
这个方法一直抛出标题中的异常,我找不到原因,我已经通过连接创建了其他表,并且所有引用的表都已创建。我正在使用嵌入式JavaDB . private void createEvidenceTable()
请看下面的代码 package normal; //This class if s for checking the database. If the database doesn't exists,
我在执行以下 SQL 语句时遇到错误: String sql = "CREATE TABLE RESERVATION ("; sql = sql + " UID VARCHAR,"; sql = sq
这个问题已经有答案了: When to use single quotes, double quotes, and backticks in MySQL (13 个回答) 已关闭 5 年前。 我刚刚开
我已经阅读了之前与我的查询相关的问题。尝试在现有代码中进行这些更改。但仍然收到此错误。我花了 3 小时解决此问题,但无法捕获该错误。请帮助我解决。 我正在使用PreparedStatement发送SQ
我目前收到此错误: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual t
我尝试运行 preparedStatement ps 来检查数据库中是否存在数据。然后它将运行更新(如果存在)或插入(如果不存在)。但是,我收到语法错误 java.sql.SQLSyntaxError
我尝试执行以下代码行: List sectList = new ArrayList(); try { String query = "SELECT * FROM legaf W
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
java.sql.SQLSyntaxErrorException: No such column: id 当表已包含id列时 我正在尝试使用以下 native SQL 查询来运行来自 Reposito
我尝试使用嵌入在程序中的HSQLDB。 但是,当我创建表并向数据库中插入数据时,出现错误。 以下是错误消息的一部分。 java.sql.SQLSyntaxErrorException: unexpec
搜索了整个网站,但没有任何帮助,所以我决定打开一个新主题。这是我的问题:我正在用 java 开发一个简单的 GUI,它在后面使用 JDBC。以下是一些标题:- 我建立了成功的数据库连接,- 我可以运行
我得到了一个大的堆栈跟踪,其根源是:java.sql.SQLSyntaxErrorException:表/ View “U”不存在。后跟所有需要的异常实体:java.sql.SQLTransactio
SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to
这是我的代码。当我运行它时,出现错误: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check th
这个问题已经有答案了: SQL query: Can't order by column called "order"? (7 个回答) 已关闭 4 年前。 我想通过 api 显示订单列表,但 DAO
我试图将一个非常长的字符串(基本上是图像的 base64 编码字符串)插入到数据库中的 CLOB 类型列中。但是我收到了异常 java.sql.SQLSyntaxErrorException 。正确的
我是一名优秀的程序员,十分优秀!