idea中出现Spring Boot Configuration Annotation Processor not found in clsspath

使用IDEA,在实体类加上@ConfigurationProperties上面会提示spring boot Configuration Annotation Proessor not found in classpath。
其实不用管它也是可以正常运行的,因为在没有指定路径的情况下,默认在 resource 下的 applications.properties 文件中查找,如果找到则返回值,如果没有找到则返回默认值null/0/false…

1.可以去掉这个提示,在idea里,File》Setting》Spring》Spring Boot,如下图所示

image.png

2.也可以在pom加一个依赖

  <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
  </dependency>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容