Package io.micronaut.spring.beans
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 Summary
Modifier and TypeFieldDescriptionprotected io.micronaut.context.DefaultBeanContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
postProcessBeanFactory
(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) void
setEnvironment
(org.springframework.core.env.Environment environment)
-
Field Details
-
micronautContext
protected io.micronaut.context.DefaultBeanContext micronautContext -
micronautBeanQualifierTypes
-
-
Constructor Details
-
MicronautBeanProcessor
- 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 interfaceorg.springframework.beans.factory.config.BeanFactoryPostProcessor
- Throws:
org.springframework.beans.BeansException
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
-