【发布时间】:2018-01-16 12:32:45
【问题描述】:
我有两个用@Configuration 注释的类/bean,我必须实例化
基于属性文件中的值。
RemoteServer1.java
@Configuration
public class RemoteServer1 {
//some authentication logic goes here
}
RemoteServer2.java
@Configuration
public class RemoteServer2 {
//some authentication logic goes here
}
application.properties
remote.server.location=RemoteServer1
现在我想实例化与属性文件中的值匹配的@Configuration 类/bean。
【问题讨论】:
标签: spring spring-boot