当前位置:网站首页>Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
2022-07-06 09:10:00 【Eric-x】
错误:Not registered via @EnableConfigurationProperties, marked as Spring component, or scanned via @ConfigurationPropertiesScan
原因:当使用@ConfigurationProperties时IDEA顶部出现这样的提示:
解决方式:
方式一:通过依赖和注解解决
1、添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
2、添加注解@Component,声明将这个组件添加至容器中
解决方式二:直接在SpringBoot启动类上加注解

参考:https://blog.csdn.net/weixin_44495678/article/details/108142287
边栏推荐
- C miscellaneous dynamic linked list operation
- max-flow min-cut
- Tianmu MVC audit II
- Pointer learning
- PR 2021 quick start tutorial, first understanding the Premiere Pro working interface
- 嵌入式开发中的防御性C语言编程
- Which is the better prospect for mechanical engineer or Electrical Engineer?
- 软件测试工程师必备之软技能:结构化思维
- MySQL combat optimization expert 09 production experience: how to deploy a monitoring system for a database in a production environment?
- [flask] crud addition and query operation of data
猜你喜欢
随机推荐
MySQL的存储引擎
Compress decompress
通过bat脚本配置系统环境变量
16 medical registration system_ [order by appointment]
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
四川云教和双师模式
CANoe下载地址以及CAN Demo 16的下载与激活,并附录所有CANoe软件版本
The governor of New Jersey signed seven bills to improve gun safety
MySQL实战优化高手06 生产经验:互联网公司的生产环境数据库是如何进行性能测试的?
MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine
MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
Vh6501 Learning Series
NLP路线和资源
嵌入式開發中的防禦性C語言編程
Automation sequences of canoe simulation functions
Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
嵌入式开发中的防御性C语言编程
单片机如何从上电复位执行到main函数?
CAPL script pair High level operation of INI configuration file
Flash operation and maintenance script (running for a long time)








