作者:夏天 | 来源:互联网 | 2023-01-28 20:28
@Value和@ConfigurationProperties注入有什么区别?为什么验证Value属性而ConfigurationProperties不是?解决方法:@Value是
@Value和@ConfigurationProperties注入有什么区别?为什么验证Value属性而ConfigurationProperties不是?
解决方法:
@Value是核心容器功能,它不提供与类型安全配置属性相同的功能.也许是因为……我想.我目前正在春天(MVC)工作(发现),我建议你看看spring reference (Externalized Configuration)