类 CustomSQLExceptionTranslatorRegistrar
- java.lang.Object
- org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar
- 所有已实现的接口:
InitializingBean
public class CustomSQLExceptionTranslatorRegistrar extends Object implements InitializingBean
Registry for customSQLExceptionTranslatorinstances for specific databases.- 从以下版本开始:
- 3.1.1
- 作者:
- Thomas Risberg
构造器概要
构造器 构造器 说明 CustomSQLExceptionTranslatorRegistrar()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidafterPropertiesSet()Invoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.voidsetTranslators(Map<String,SQLExceptionTranslator> translators)Setter for a Map ofSQLExceptionTranslatorreferences where the key must be the database name as defined in thesql-error-codes.xmlfile.
构造器详细资料
CustomSQLExceptionTranslatorRegistrar
public CustomSQLExceptionTranslatorRegistrar()
方法详细资料
setTranslators
public void setTranslators(Map<String,SQLExceptionTranslator> translators)
Setter for a Map ofSQLExceptionTranslatorreferences where the key must be the database name as defined in thesql-error-codes.xmlfile.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()
从接口复制的说明:InitializingBeanInvoked by the containingBeanFactoryafter it has set all bean properties and satisfiedBeanFactoryAware,ApplicationContextAwareetc.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