Class MapperScannerRegistrar

java.lang.Object
cn.lm.mybatis.spring.annotation.MapperScannerRegistrar
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware, org.springframework.context.ResourceLoaderAware

public class MapperScannerRegistrar extends Object implements org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.ResourceLoaderAware, org.springframework.context.EnvironmentAware
A ImportBeanDefinitionRegistrar to allow annotation configuration of MyBatis mapper scanning. Using an @Enable annotation allows beans to be registered via @Component configuration, whereas implementing BeanDefinitionRegistryPostProcessor will work for XML configuration.
Since:
1.2.0
Author:
Michael Lanyon, Eduardo Macarron, Putthiphong Boonphong
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
     
    void
    setEnvironment(org.springframework.core.env.Environment environment)
     
    void
    setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar

    registerBeanDefinitions
  • Field Details

    • LOGGER

      public static final org.slf4j.Logger LOGGER
  • Constructor Details

    • MapperScannerRegistrar

      public MapperScannerRegistrar()
  • Method Details

    • setResourceLoader

      public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
      Specified by:
      setResourceLoader in interface org.springframework.context.ResourceLoaderAware
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • registerBeanDefinitions

      public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Specified by:
      registerBeanDefinitions in interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar