IDEA 使用 @ConfigurationProperties 注解的时提示:Spring Boot Configuration Annotation Proessor not configured。
缺少相关依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
添加 spring-boot-configuration-processor 依赖后,IDEA 就不会再有这个提示了。同时打出的包里 META-INF 目录下会多出个 spring-configuration-metadata.json 文件。
该文件里面描述了上面 Java 代码定义的配置项,以及配置项对应的类型和类。