This rule flags usage of the
org.springframework.jdbc*
package. Spring Framework 6.0 switches to a new exception translator
SQLExceptionSubclassTranslator
that avoids vendor-specific error codes. If your application relies on legacy behavior, you can switch back to using
SQLErrorCodeSQLExceptionTranslator in your code.
To restore Spring's legacy default error code mappings, you can either configure the application to use SQLErrorCodeSQLExceptionTranslator
as the SQL exception translator, or include an empty sql-error-codes.xml
file at the root of the classpath.
For more information, see the following resources: