public class MapperScannerConfigurer extends Object implements org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanNameAware
| 构造器和说明 |
|---|
MapperScannerConfigurer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
afterPropertiesSet() |
org.springframework.beans.factory.support.BeanNameGenerator |
getNameGenerator()
Gets beanNameGenerator to be used while running the scanner.
|
void |
postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
void |
setAddToConfig(boolean addToConfig)
Same as
MapperFactoryBean#setAddToConfig(boolean). |
void |
setAnnotationClass(Class<? extends Annotation> annotationClass)
This property specifies the annotation that the scanner will search for.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setBasePackage(String basePackage) |
void |
setBeanName(String name) |
void |
setMarkerInterface(Class<?> superClass)
This property specifies the parent that the scanner will search for.
|
void |
setNameGenerator(org.springframework.beans.factory.support.BeanNameGenerator nameGenerator)
Sets beanNameGenerator to be used while running the scanner.
|
void |
setProcessPropertyPlaceHolders(boolean processPropertyPlaceHolders) |
void |
setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
已过时。
Use
setSqlSessionFactoryBeanName(String) instead. |
void |
setSqlSessionFactoryBeanName(String sqlSessionFactoryName)
Specifies which
SqlSessionFactory to use in the case that there is
more than one in the spring context. |
void |
setSqlSessionTemplateBeanName(String sqlSessionTemplateName)
Specifies which
SqlSessionTemplate to use in the case that there is
more than one in the spring context. |
public void setBasePackage(String basePackage)
public void setAddToConfig(boolean addToConfig)
MapperFactoryBean#setAddToConfig(boolean).addToConfig - MapperFactoryBean#setAddToConfig(boolean)public void setAnnotationClass(Class<? extends Annotation> annotationClass)
The scanner will register all interfaces in the base package that also have the specified annotation.
Note this can be combined with markerInterface.
annotationClass - annotation classpublic void setMarkerInterface(Class<?> superClass)
The scanner will register all interfaces in the base package that also have the specified interface class as a parent.
Note this can be combined with annotationClass.
superClass - parent classpublic void setSqlSessionTemplateBeanName(String sqlSessionTemplateName)
SqlSessionTemplate to use in the case that there is
more than one in the spring context. Usually this is only needed when you
have more than one datasource.
Note bean names are used, not bean references. This is because the scanner loads early during the start process and it is too early to build mybatis object instances.
sqlSessionTemplateName - Bean name of the SqlSessionTemplate@Deprecated public void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
setSqlSessionFactoryBeanName(String) instead.SqlSessionFactory to use in the case that there is
more than one in the spring context. Usually this is only needed when you
have more than one datasource.
sqlSessionFactory - public void setSqlSessionFactoryBeanName(String sqlSessionFactoryName)
SqlSessionFactory to use in the case that there is
more than one in the spring context. Usually this is only needed when you
have more than one datasource.
Note bean names are used, not bean references. This is because the scanner loads early during the start process and it is too early to build mybatis object instances.
sqlSessionFactoryName - Bean name of the SqlSessionFactorypublic void setProcessPropertyPlaceHolders(boolean processPropertyPlaceHolders)
processPropertyPlaceHolders - public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
setApplicationContext 在接口中 org.springframework.context.ApplicationContextAwarepublic void setBeanName(String name)
setBeanName 在接口中 org.springframework.beans.factory.BeanNameAwarepublic org.springframework.beans.factory.support.BeanNameGenerator getNameGenerator()
public void setNameGenerator(org.springframework.beans.factory.support.BeanNameGenerator nameGenerator)
nameGenerator - the beanNameGenerator to setpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBeanExceptionpublic void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
postProcessBeanFactory 在接口中 org.springframework.beans.factory.config.BeanFactoryPostProcessorpublic void postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
postProcessBeanDefinitionRegistry 在接口中 org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessorCopyright © 2016. All rights reserved.