学习pringBoot项目时,在写controller时发现,项目可以运行但是在当前controller类顶部出现Spring Boot Configuration Annotation Processor not configured。
原因是:
没有配置springboot的自动配置注解处理器,即spring-boot-configuration-processor。
在controller类中使用到ConfigurationProperties注解时无法识别。
解决办法:在pom文件中加入依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
刷新Maven出现如图,点击hide notice就解决,再次启动IDEA完美解决!