spring boot configuration annotation processor not configured

1、問題原因
在使用@ConfigurationProperties(prefix = “”) 註解的是時候idea 會提示這個錯誤 !

2、問題解決
在pom.xml 加上就好了

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-configuration-processor</artifactId>
  <optional>true</optional>
</dependency>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章