- 出現spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationProperties這個註解時,因此問題出如今ConfigurationProperties註解。
- 根據提示的not found in classpath,查詢此註解的使用關於怎麼指定classpath,進而查詢location,spring boot1.5以上版本@ConfigurationProperties取消location註解
解決辦法,引入Maven依賴,在pom.xml文件中加入spring
<dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-configuration-processor </artifactId> <optional> true </optional> </dependency>