当前位置:网站首页>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
边栏推荐
- 如何让shell脚本变成可执行文件
- Sichuan cloud education and double teacher model
- MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
- 宝塔的安装和flask项目部署
- 14 medical registration system_ [Alibaba cloud OSS, user authentication and patient]
- 14 医疗挂号系统_【阿里云OSS、用户认证与就诊人】
- 西南大学:胡航-关于学习行为和学习效果分析
- MySQL实战优化高手05 生产经验:真实生产环境下的数据库机器配置如何规划?
- 112 pages of mathematical knowledge sorting! Machine learning - a review of fundamentals of mathematics pptx
- C杂讲 文件 初讲
猜你喜欢

CANoe下载地址以及CAN Demo 16的下载与激活,并附录所有CANoe软件版本

Which is the better prospect for mechanical engineer or Electrical Engineer?

宝塔的安装和flask项目部署

MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?

The 32-year-old fitness coach turned to a programmer and got an offer of 760000 a year. The experience of this older coder caused heated discussion
![[NLP] bert4vec: a sentence vector generation tool based on pre training](/img/fd/8e5e1577b4a6ccc06e29350a1113ed.jpg)
[NLP] bert4vec: a sentence vector generation tool based on pre training

嵌入式開發中的防禦性C語言編程

C miscellaneous dynamic linked list operation

Learning SCM is of great help to society

Listen to my advice and learn according to this embedded curriculum content and curriculum system
随机推荐
How can I take a shortcut to learn C language in college
Why can't TN-C use 2p circuit breaker?
在CANoe中通过Panel面板控制Test Module 运行(初级)
零基础学习单片机切记这四点要求,少走弯路
Several errors encountered when installing opencv
C杂讲 浅拷贝 与 深拷贝
Function description of shell command parser
简单解决phpjm加密问题 免费phpjm解密工具
四川云教和双师模式
MySQL ERROR 1040: Too many connections
Constants and pointers
Redis集群方案应该怎么做?都有哪些方案?
竞赛vscode配置指南
Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
[CV] target detection: derivation of common terms and map evaluation indicators
MySQL real battle optimization expert 08 production experience: how to observe the machine performance 360 degrees without dead angle in the process of database pressure test?
13 medical registration system_ [wechat login]
MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
What should the redis cluster solution do? What are the plans?
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide