Not registered via @EnableConfigurationProperties, marked as Spring component, or scanned via @ConfigurationPropertiesScan
时间: 2023-10-13 08:00:32 浏览: 164
回答: 错误信息"Not registered via @EnableConfigurationProperties, marked as Spring component, or scanned via @ConfigurationPropertiesScan"的含义是,某个组件没有通过@EnableConfigurationProperties注册,或者没有被标记为Spring组件,或者没有被@ConfigurationPropertiesScan扫描到。解决这个问题的方法是,在启动类中加入@EnableConfigurationProperties注解。这个注解的作用是让使用了@ConfigurationProperties注解的类生效。通过加入这个注解,可以解决这个错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [【Spring Boot采坑记】- 自定义配置之 @ConfigurationProperties 和 @EnableConfigurationProperties](https://blog.csdn.net/wy0682109523/article/details/106542913)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)](https://blog.csdn.net/weixin_47316183/article/details/125312210)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Not registered via @EnableConfigurationProperties, marked as Spring component, or scanned via @Confi](https://blog.csdn.net/HRX98/article/details/131823871)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文