我的问题如下:当我在“邮递员”应用程序中创建 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)