简体   繁体   中英

@Bean annotation name attribute value to take from properties file

I want to read @Bean annotations name attribute value from properties file, something like below.

Properties File:
myBeanName: abc

In java code I want to achieve as below,
@Bean(name = "${myBeanName}") Which should be equal to @Bean(name = "abc")

Thanks in advance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM