【问题描述】使用@ConfigrationProperties的时候,提示我需要导入 spring-boot-configuration-processor依赖,但是从官网的pom依赖显示找不到,去maven仓库看已经有这个jar包了。但就是找不到
(官方版)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor </artifactId>
<optional>true</optional>
</dependency>
【解决方案】官方的坐标没有指定版本,可能默认版本不一致(猜测)换如下依赖即可
(指定版本)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>1.4.0.RELEASE</version>
</dependency>