学无先后,达者为师

网站首页 编程语言 正文

spring boot configuration annotation processor notconfigured解决方法

作者:魚迹 更新时间: 2023-12-19 编程语言

spring boot configuration annotation processor notconfigured解决方法

  • 一、问题描述
  • 二、解决方法

一、问题描述

我在使用ConfigurationProperties注解的时候idea出现提示信息spring boot configuration annotation processor notconfigured,但是却不影响程序的运行,如下图所示:
在这里插入图片描述

二、解决方法

“spring boot configuration annotation processor not configured”这个问题通常是由于构建工具没有正确配置Annotation Processor引起的。在使用Spring Boot时,如果项目中使用@Configuration注解,而构建工具没有正确配置Annotation Processor,就可能会遇到这个问题。

在项目的pom文件中引入spring-boot-configuration-processor依赖即可

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
</dependency>

原文链接:https://blog.csdn.net/weixin_45915647/article/details/134345071

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新