SpringBoot Configuration Annotation Proessor not found in classpath配置問題解決

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>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章