Package com.foreach.across.config
Class AcrossContextConfiguration
java.lang.Object
com.foreach.across.config.AcrossContextConfiguration
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.context.annotation.ImportAware
,org.springframework.context.EnvironmentAware
@Configuration
@Import(AcrossContextWebConfiguration.class)
public class AcrossContextConfiguration
extends Object
implements org.springframework.context.annotation.ImportAware, org.springframework.context.EnvironmentAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanClassLoaderAware
Creates an AcrossContext bean and will apply all AcrossContextConfigurer instances
before bootstrapping. Depending on the settings imported from EnableAcrossContext
,
modules will be auto-configured and further configuration of the context delegated to the configurer beans.
A single DataSource
bean or one named acrossDataSource is required for installers to work.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionacrossContext
(org.springframework.context.ConfigurableApplicationContext applicationContext, Optional<DataSource> acrossDataSource, Optional<DataSource> installerDataSource) void
forwardApplicationEvent
(org.springframework.context.ApplicationEvent event) moduleDependencyResolver
(org.springframework.context.ApplicationContext applicationContext) void
setBeanClassLoader
(ClassLoader classLoader) void
setBeanFactory
(org.springframework.beans.factory.BeanFactory beanFactory) void
setEnvironment
(org.springframework.core.env.Environment environment) void
setImportMetadata
(org.springframework.core.type.AnnotationMetadata importMetadata) org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory
-
Constructor Details
-
AcrossContextConfiguration
public AcrossContextConfiguration()
-
-
Method Details
-
setImportMetadata
public void setImportMetadata(org.springframework.core.type.AnnotationMetadata importMetadata) - Specified by:
setImportMetadata
in interfaceorg.springframework.context.annotation.ImportAware
-
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironment
in interfaceorg.springframework.context.EnvironmentAware
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) - Specified by:
setBeanFactory
in interfaceorg.springframework.beans.factory.BeanFactoryAware
-
setBeanClassLoader
- Specified by:
setBeanClassLoader
in interfaceorg.springframework.beans.factory.BeanClassLoaderAware
-
acrossContext
@Bean @DependsOnDatabaseInitialization public AcrossContext acrossContext(org.springframework.context.ConfigurableApplicationContext applicationContext, @Qualifier("acrossDataSource") Optional<DataSource> acrossDataSource, @Qualifier("acrossInstallerDataSource") Optional<DataSource> installerDataSource) -
forwardApplicationEvent
@Order(-2147483648) @EventListener public void forwardApplicationEvent(org.springframework.context.ApplicationEvent event) -
moduleDependencyResolver
@Bean @Lazy public ModuleDependencyResolver moduleDependencyResolver(org.springframework.context.ApplicationContext applicationContext)
-