Spring Boot踩坑记录(一)

2018-10-11  本文已影响0人  wustmz

问题:

使用注解@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>
上一篇 下一篇

猜你喜欢

热点阅读