@EnableConfigurationProperties 注解的作用是:让使用了 @ConfigurationProperties 注解的类生效,并且将该类注入到 IOC 容器中,交由 IOC 容器进行管理
使用 @ConfigurationProperties + @Component 注解,来读取配置文件
有时配置@Component注解不生效,可以在启动类上配置@EnableConfigurationProperties注解

@EnableConfigurationProperties 注解的作用是:让使用了 @ConfigurationProperties 注解的类生效,并且将该类注入到 IOC 容器中,交由 IOC 容器进行管理
使用 @ConfigurationProperties + @Component 注解,来读取配置文件
有时配置@Component注解不生效,可以在启动类上配置@EnableConfigurationProperties注解
上一篇 IDEA修改启动参数覆盖bootstrap配置文件参数
下一篇 解决backtrader调用cerebro.plot报错ImportError Cannot import name ‘warnings‘ from ‘matplotlib.dates