spring-framework / org.springframework.jdbc.support / CustomSQLExceptionTranslatorRegistrar

CustomSQLExceptionTranslatorRegistrar

open class CustomSQLExceptionTranslatorRegistrar : InitializingBean

Registry for registering custom org.springframework.jdbc.support.SQLExceptionTranslator instances for specific databases.

Author
Thomas Risberg

Since
3.1.1

Constructors

<init>

CustomSQLExceptionTranslatorRegistrar()

Registry for registering custom org.springframework.jdbc.support.SQLExceptionTranslator instances for specific databases.

Functions

afterPropertiesSet

open fun afterPropertiesSet(): Unit

setTranslators

open fun setTranslators(translators: MutableMap<String, SQLExceptionTranslator>): Unit

Setter for a Map of SQLExceptionTranslator references where the key must be the database name as defined in the sql-error-codes.xml file.

Note that any existing translators will remain unless there is a match in the database name, at which point the new translator will replace the existing one.