@ConfigurationProperties注解提示Configuration Annotation Proessor not found in classpath 解决方案
@ConfigurationProperties注解提示Configuration Annotation Proessor not found in classpath 解决方案
菜鸟本人要配置一个七牛云的上传Demo,参考了网上各位大佬的傻瓜式教程,在配置yml文件属性类时候使用@ConfigurationProperties(prefix = “qiniu”) 时候IDE的窗口上出现"Spring Boot Configuration Annotation Proessor not found in classpath"。
原因
这里搬运一下福尔摩帅的原因讲解:
-
出现spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationProperties这个注解时,所以问题出现在ConfigurationProperties注解。
-
根据提示的not found in classpath,查询此注解的使用关于怎么指定classpath,进而查询location,spring boot1.5以上版本@ConfigurationProperties取消location注解
解决方法
在Maven中添加如下依赖即可
<dependency>
<groupId> org.springframework.boot </groupId>
<artifactId> spring-boot-configuration-processor </artifactId>
<optional> true </optional>
</dependency>
添加后效果
添加后出现如下提示,不用管,正常运行即可。
作为笔记和学习交流之用。