类 CustomSQLExceptionTranslatorRegistrar
- java.lang.Object
- org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar
- 所有已实现的接口:
InitializingBean
public class CustomSQLExceptionTranslatorRegistrar extends Object implements InitializingBean
Registry for registering customSQLExceptionTranslator
instances for specific databases.- 从以下版本开始:
- 3.1.1
- 作者:
- Thomas Risberg
构造器概要
构造器 构造器 说明 CustomSQLExceptionTranslatorRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.void
setTranslators(Map<String,SQLExceptionTranslator> translators)
Setter for a Map ofSQLExceptionTranslator
references where the key must be the database name as defined in thesql-error-codes.xml
file.
构造器详细资料
CustomSQLExceptionTranslatorRegistrar
public CustomSQLExceptionTranslatorRegistrar()
方法详细资料
setTranslators
public void setTranslators(Map<String,SQLExceptionTranslator> translators)
Setter for a Map ofSQLExceptionTranslator
references where the key must be the database name as defined in thesql-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.
afterPropertiesSet
public void afterPropertiesSet()
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- 指定者:
afterPropertiesSet
在接口中InitializingBean