原文链接:https://blog.csdn.net/w05980598/article/details/79167826
由于使用的spring boot 2.0, 使用
ConfigurationProperties
注解时会出现:
Configuration Annotation Proessor not found in classpath
根据提示的not found in classpath,查询此注解的使用关于怎么指定classpath,进而查询location,spring boot1.5以上版本@ConfigurationProperties取消location注解
官方解决方案,pom中加入依赖:
<dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-configuration-processor </artifactId> <optional> true </optional> </dependency>