1、当用@ConfigurationProperty把yml配置文件转化成bean,不用@EnableConfigurationProperty也能生效,怀疑是其他注解中间接包含了这个注解,暂时还没找到?


2、为什么springboot启动类需要有@Configuration注解?因为没有程序本地也能正常启动。
1、当用@ConfigurationProperty把yml配置文件转化成bean,不用@EnableConfigurationProperty也能生效,怀疑是其他注解中间接包含了这个注解,暂时还没找到?
2、为什么springboot启动类需要有@Configuration注解?因为没有程序本地也能正常启动。
本文标题:Spring 存疑(待解答)
本文链接:https://www.haomeiwen.com/subject/ctdisctx.html
网友评论