Spring Boot REST·@Constraint是否要删除?

Spring Boot REST·@Constraint是否要删除?,第1张

Spring Boot REST·@Constraint是否要删除?

我终于找到了答案。在中

application.properties
添加

spring.jpa.properties.javax.persistence.validation.group.pre-remove=javax.validation.groups.Default

链接的问题告诉我我需要哪个财产,但我不知道将其放在何处。我尝试使用自定义Java配置甚至

persistence.xml
配置,但其他几项失败。

在这里,我了解到“
创建

spring.jpa.properties.*
本地时,所有的属性都作为普通的JPA属性(除去前缀)传递
EntityManagerFactory
。”
所以我只添加了该前缀即可使用。



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5621636.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-15
下一篇2022-12-15

发表评论

登录后才能评论

评论列表(0条)

    保存