public class DynamicDataSourceRegister
extends java.lang.Object
implements org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware
构造器和说明 |
---|
DynamicDataSourceRegister() |
限定符和类型 | 方法和说明 |
---|---|
void |
registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
注册数据源
|
void |
setEnvironment(org.springframework.core.env.Environment env)
加载多数据源配置,初始化各数据源
|
public void setEnvironment(org.springframework.core.env.Environment env)
setEnvironment
在接口中 org.springframework.context.EnvironmentAware
public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
registerBeanDefinitions
在接口中 org.springframework.context.annotation.ImportBeanDefinitionRegistrar
importingClassMetadata
- 注入元数据registry
- bean定义