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

 2019-10-17 21:59  阅读(2394)
文章分类:Spring boot

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.


来源:[]()

点赞(0)
版权归原创作者所有,任何形式转载请联系作者; Java 技术驿站 >> [Spring Boot]Spring Boot Configuration Annotation Processor not found in classpath

相关推荐