All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.nichetoolkit.mybatis.configure.MybatisRestMapperScanner Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
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