美文网首页
Spring Boot踩坑记录(一)

Spring Boot踩坑记录(一)

作者: wustmz | 来源:发表于2018-10-11 16:05 被阅读0次

问题:

使用注解@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>

相关文章

网友评论

      本文标题:Spring Boot踩坑记录(一)

      本文链接:https://www.haomeiwen.com/subject/zsbbaftx.html