I'm using Spring Boot application. In some @Component
class @Value
fields are loaded, instead on other classes they are always null
.
Seems that @Value
(s) are loaded after my @Bean
/@Component
are created.
I need to load some values from a properties file in my @Bean
.
Have you some suggestion?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…