我真的想在我的实体中设置默认值,假设我有表客户,并且我希望read column
为默认false,
我尝试为该列使用@JsonIgnore
,但未在请求正文中编写post
方法,但出现一些错误
错误是这样的:
"org.hibernate.exception.SQLGrammarException: could not execute
statement; nested exception is
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement"
我的请求正文:
{ name: "test" }
我说过要在请求正文中忽略键和值read column
,因为它已经默认为false
我上面有错误 我想要发布后的结果,显示json这样的
{ name: "test", read: false }