io.github.nichetoolkit.mybatis.configure.MybatisRestMapperScanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mybatis-toolkit-starter Show documentation
Show all versions of mybatis-toolkit-starter Show documentation
mybatis toolkit starter project for Spring Boot
package io.github.nichetoolkit.mybatis.configure;
import io.github.nichetoolkit.mybatis.stereotype.RestMapper;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.lang.NonNull;
import java.util.Set;
/**
* MybatisRestMapperScanner
* The mybatis rest mapper scanner class.
* @author Cyan ([email protected])
* @see org.springframework.context.annotation.ClassPathBeanDefinitionScanner
* @since Jdk1.8
*/
public class MybatisRestMapperScanner extends ClassPathBeanDefinitionScanner {
/**
* MybatisRestMapperScanner
* Instantiates a new mybatis rest mapper scanner.
* @param registry {@link org.springframework.beans.factory.support.BeanDefinitionRegistry} The registry parameter is BeanDefinitionRegistry
type.
* @param useDefaultFilters boolean The use default filters parameter is boolean
type.
* @see org.springframework.beans.factory.support.BeanDefinitionRegistry
*/
public MybatisRestMapperScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters) {
super(registry, useDefaultFilters);
}
/**
* registerFilters
* The register filters method.
*/
protected void registerFilters() {
addIncludeFilter(new AnnotationTypeFilter(RestMapper.class));
}
@NonNull
@Override
protected Set doScan(@NonNull String... basePackages) {
return super.doScan(basePackages);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy