问题:
使用注解@ConfigurationProperties
注解时出现Spring Boot Configuration Annotation Proessor not found in classpath
的提示
分析:
问题定位在注解@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>
网友评论