英文:
Is it possible to set name as a variable in springboot, like @Bean(name = "abc")? can we pass value of abc dynamically?
问题
@Primary
@Bean(name = "business-test")
public DataSource dataSource() {
}
在这里,我正在创建一个名为"business-test"的数据源,但这个值应该来自另一个应用清单。是否有可能实现这一点?或者我们如何可以实现这一点?
英文:
@Primary
@Bean(name = "business-test")
public DataSource dataSource() {
}
here I am creating a data source with bean name "business-test" but this value should come from another application manifest. is it possible to do so? or how can we achieve this?
专注分享java语言的经验与见解,让所有开发者获益!
评论