小编HZK*_*HZK的帖子

消息 -“无法读取 hi 值 - 您需要填充表:hibernate_sequence”

我的问题如下:当我在“邮递员”应用程序中创建 POST 请求时。这就是我尝试发布的内容

  {"name": "John Doe", "email":"jdoe@test.com", "city": "London"}
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

{
"timestamp": "2018-11-19T20:16:00.486+0000",
"status": 500,
"error": "Internal Server Error",
"message": "could not read a hi value - you need to populate the table: hibernate_sequence; nested exception is org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence",
"path": "/api/ver01/product"
}
Run Code Online (Sandbox Code Playgroud)

我正在搜索框中寻找答案,但没有人帮助我。所以我认为问题出在 sql 代码中,但我不确定。整个项目是用intelliJ IDE编写的。

这是我的产品类。

package com.hubertkulas.webstore.store.archetype;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.sql.Date;

@Entity
@JsonIgnoreProperties({"hibernateLazyInitializer", …
Run Code Online (Sandbox Code Playgroud)

java sql hibernate spring-boot postman

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

hibernate ×1

java ×1

postman ×1

spring-boot ×1

sql ×1