public class CustomSQLExceptionTranslatorRegistrar extends Object implements org.springframework.beans.factory.InitializingBean
SQLExceptionTranslator
instances for specific databases.Constructor and Description |
---|
CustomSQLExceptionTranslatorRegistrar() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
setTranslators(Map<String,SQLExceptionTranslator> translators)
Setter for a Map of
SQLExceptionTranslator references where the key must
be the database name as defined in the sql-error-codes.xml file. |
public CustomSQLExceptionTranslatorRegistrar()
public void setTranslators(Map<String,SQLExceptionTranslator> translators)
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.
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean