- 出現(xiàn)spring boot Configuration Annotation Proessor not found in classpath的提示是在用了@ConfigurationProperties這個(gè)注解時(shí)是尖,所以問(wèn)題出現(xiàn)在ConfigurationProperties注解胚吁。
- 根據(jù)提示的not found in classpath,查詢(xún)此注解的使用關(guān)于怎么指定classpath,進(jìn)而查詢(xún)location倔矾,spring boot1.5以上版本@ConfigurationProperties取消location注解
官方解決方案尿招,Maven引入依賴(lài)
<dependency>
<groupId> org.springframework.boot </groupId>
<artifactId> spring-boot-configuration-processor </artifactId>
<optional> true </optional>
</dependency>
注:引入依賴(lài)后凶硅,問(wèn)題解決倦沧,親測(cè)有效
本文引用自:https://blog.csdn.net/w05980598/article/details/79167826