@Documented @Retention(value=RUNTIME) @Target(value=TYPE) @Import(value=MyBatisMapperScannerConfigurer.class) public @interface MapperScanner
| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends Annotation> |
annotationClass
This property specifies the annotation that the scanner will search for.
|
String[] |
basePackages
Base packages to scan for MyBatis interfaces.
|
Class<?> |
markerInterface
This property specifies the parent that the scanner will search for.
|
Class<? extends org.springframework.beans.factory.support.BeanNameGenerator> |
nameGenerator
The
BeanNameGenerator class to be used for naming detected components
within the Spring container. |
String |
sqlSessionFactoryRef
Specifies which
SqlSessionFactory to use in the case that there is
more than one in the spring context. |
String |
sqlSessionTemplateRef
Specifies which
SqlSessionTemplate to use in the case that there is
more than one in the spring context. |
String[] |
value
Alias for the
basePackages() attribute. |
public abstract String[] value
basePackages() attribute. Allows for more concise
annotation declarations e.g.:
@MapperScanner("org.my.pkg") instead of @MapperScanner(basePackages= "org.my.pkg")}.public abstract String[] basePackages
public abstract Class<? extends org.springframework.beans.factory.support.BeanNameGenerator> nameGenerator
BeanNameGenerator class to be used for naming detected components
within the Spring container.public abstract 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.
public abstract Class<?> markerInterface
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.
public abstract String sqlSessionTemplateRef
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.public abstract String sqlSessionFactoryRef
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.Copyright © 2022. All rights reserved.