❤️ 个人主页:水滴技术
订阅专栏:成功解决 BUG 合集
支持水滴:点赞 + 收藏⭐ + 留言
在 Spring Boot 项目中,添加一个配置文件时,会提示“Spring Boot Configuration Annotation Processor not configured”,如下图所示:
经过查询官网,需要配置注解处理器spring-boot-configuration-processor.jar
,官方原文:
You can easily generate your own configuration metadata file from items annotated with @ConfigurationProperties
by using the spring-boot-configuration-processor
jar. The jar includes a Java annotation processor which is invoked as your project is compiled.
在 POM 文件中添加下面 Maven 依赖:
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-configuration-processorartifactId>
<optional>trueoptional>
dependency>
再打开配置文件,已经没有提示了,问题解决。