Springboot 之 @EnableConfigurationProperties 注解
@EnableConfigurationProperties 注解的作用是:让使用了 @ConfigurationProperties 注解的类生效,并且将该类注入到 IOC 容器中,交由 IOC 容器进行管理一、使用 @ConfigurationProperties + @Component 注解如果一个类只配置了 @ConfigurationProperties 注解,而没有使用 @Component 注解将该类加入到 IOC 容器中,那么它就不能完成 xxx.properties 配置文件和 Ja
原创
2022-05-03 21:24:26 ·
265 阅读 ·
0 评论