Class MicronautBeanProcessor

java.lang.Object
io.micronaut.spring.beans.MicronautBeanProcessor
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.DisposableBean, org.springframework.context.EnvironmentAware

public class MicronautBeanProcessor extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.DisposableBean, org.springframework.context.EnvironmentAware
Adds Micronaut beans to a Spring application context. This processor will find all of the Micronaut beans of the specified types and add them as beans to the Spring application context.
Since:
1.0
Author:
jeffbrown
  • Field Details

    • micronautContext

      protected io.micronaut.context.DefaultBeanContext micronautContext
    • micronautBeanQualifierTypes

      protected final List<Class<?>> micronautBeanQualifierTypes
  • Constructor Details

    • MicronautBeanProcessor

      public MicronautBeanProcessor(Class<?>... qualifierTypes)
      Parameters:
      qualifierTypes - The types associated with the Micronaut beans which should be added to the Spring application context.
  • Method Details

    • postProcessBeanFactory

      public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • setEnvironment

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