标签: java hibernate spring-data-jpa
有没有办法覆盖 Spring Boot 中的 SQLExceptionConverter?
SQLExceptionConverter
答案 0 :(得分:1)
我认为有两种方式:
您可以创建自定义的休眠方言,以扩展一些标准的休眠方言并覆盖方法 buildSQLExceptionConversionDelegate。
还可以通过 hibernate.jdbc.sql_exception_converter 配置属性插入自定义实现。
hibernate.jdbc.sql_exception_converter
另请参阅文档的 this 和 this 部分。