在Spring Boot中使用 @ConfigurationProperties 注解
not registered via @EnableConfigurationProperties or marked as spring compoent
回到自定义的bean Person中,添加注解@Component,声明将这个组件添加至容器中,这样才可以被使用?
“只有这个组件是容器中的组件,才能使用容器提供的@ConfigurationProperties功能,”
@Configur...
原创
2019-09-18 16:27:11 ·
369 阅读 ·
0 评论