spring boot configuration annotation processor notfound in classpath_Spring Boot

最近研究Spring Boot,在获取配置文件的时候一直提示,spring引导配置注释处理器在类路径中找不到,虽然不影响代码的运行以及获取,但是这样提示肯定是有问题的。

在spring boot原本的@ConfigurationProperties注解中是有location属性的,1.5版本就将此属性移除了,因此导致无法正常给配置类的属性赋值,通过在spring boot 官网查询到只要在pom文件中添加一个依赖即可

	<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>

重新编译一下

spring boot configuration annotation processor notfound in classpath_Spring Boot_02