如果一个类只使用@ConfigurationProperties注解(表示该类用于读取application.properties或application.yml配置文件)
为了让该类实例化,加载到spring容器中,需要在 启动类 或 配置类 加上注解@EnableConfigurationProperties(类名.class)
详见:https://www.malaoshi.top/show_1EF5rAR3rN87.html
如果一个类只使用@ConfigurationProperties注解(表示该类用于读取application.properties或application.yml配置文件)
为了让该类实例化,加载到spring容器中,需要在 启动类 或 配置类 加上注解@EnableConfigurationProperties(类名.class)
详见:https://www.malaoshi.top/show_1EF5rAR3rN87.html