SpringBoot配置問題解決
報錯:
spring boot Configuration Annotation Proessor not found in classpath
在idea的代碼最上方顯示綠條,大概就是漲不到配置文件(yml)的路徑,屬於下面這個註解的報錯
@ConfigurationProperties(prefix = "xxx")
解決:
配置pom.xml文件,添加以下內容
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>