[Spring Boot]Spring Boot Configuration Annotation Processor not found in classpath

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ShelleyLittlehero/article/details/84765719

MARK

问题:

这个报错似乎没有对项目正常运行产生影响.具体什么原理目前还不搞明白,mark

解决:

官方解决方案

添加依赖:

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

B.3.2 Adding Additional Metadata
Spring Boot’s configuration file handling is quite flexible, and it is often the case that properties may exist that are not bound to a @ConfigurationProperties bean. You may also need to tune some attributes of an existing key. To support such cases and let you provide custom “hints”, the annotation processor automatically merges items from META-INF/additional-spring-configuration-metadata.json into the main metadata file.

If you refer to a property that has been detected automatically, the description, default value, and deprecation information are overridden, if specified. If the manual property declaration is not identified in the current module, it is added as a new property.

The format of the additional-spring-configuration-metadata.json file is exactly the same as the regular spring-configuration-metadata.json. The additional properties file is optional. If you do not have any additional properties, do not add the file.

猜你喜欢

转载自blog.csdn.net/ShelleyLittlehero/article/details/84765719