当前位置:网站首页>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
边栏推荐
- 16 医疗挂号系统_【预约下单】
- 在CANoe中通过Panel面板控制Test Module 运行(初级)
- Single chip microcomputer realizes modular programming: Thinking + example + system tutorial (the degree of practicality is appalling)
- MySQL combat optimization expert 04 uses the execution process of update statements in the InnoDB storage engine to talk about what binlog is?
- MySQL实战优化高手02 为了执行SQL语句,你知道MySQL用了什么样的架构设计吗?
- 单片机如何从上电复位执行到main函数?
- Control the operation of the test module through the panel in canoe (primary)
- 在CANoe中通過Panel面板控制Test Module 運行(初級)
- max-flow min-cut
- Can I learn PLC at the age of 33
猜你喜欢

如何让shell脚本变成可执行文件

CAPL 脚本对.ini 配置文件的高阶操作

CANoe仿真功能之自动化序列(Automation Sequences )

MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位

CANoe不能自动识别串口号?那就封装个DLL让它必须行

What should the redis cluster solution do? What are the plans?

The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant

Regular expressions are actually very simple

C杂讲 文件 续讲

Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
随机推荐
美新泽西州州长签署七项提高枪支安全的法案
Retention policy of RMAN backup
16 医疗挂号系统_【预约下单】
How to make shell script executable
在CANoe中通过Panel面板控制Test Module 运行(高级)
MySQL實戰優化高手04 借著更新語句在InnoDB存儲引擎中的執行流程,聊聊binlog是什麼?
South China Technology stack cnn+bilstm+attention
A new understanding of RMAN retention policy recovery window
[one click] it only takes 30s to build a blog with one click - QT graphical tool
Control the operation of the test module through the panel in canoe (primary)
MySQL实战优化高手02 为了执行SQL语句,你知道MySQL用了什么样的架构设计吗?
软件测试工程师必备之软技能:结构化思维
C miscellaneous dynamic linked list operation
MySQL combat optimization expert 07 production experience: how to conduct 360 degree dead angle pressure test on the database in the production environment?
Contrôle de l'exécution du module d'essai par panneau dans Canoe (primaire)
CAPL 脚本对.ini 配置文件的高阶操作
软件测试工程师必备之软技能:结构化思维
Elk project monitoring platform deployment + deployment of detailed use (II)
flask运维脚本(长时间运行)
A necessary soft skill for Software Test Engineers: structured thinking