码迷,mamicode.com
首页 > 编程语言 > 详细

spring-configuration-metadata元数据与additional-spring-configuration-metadata元数据区别

时间:2020-01-14 13:00:23      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:man   http   val   pre   doc   cal   prope   value   option   

参考 https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html#configuration-metadata-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 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 into the main metadata file.@ConfigurationPropertiesMETA-INF/additional-spring-configuration-metadata.json

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 file is exactly the same as the regular . The additional properties file is optional. If you do not have any additional properties, do not add the file.additional-spring-configuration-metadata.json spring-configuration-metadata.json

 

 

additional-spring-configuration-metadata.json 为手动添加, spring-configuration-metadata.json自动生成。additional-spring-configuration-metadata.json将会合并到spring-configuration-metadata.json中,并覆盖掉相同的说明。

 

spring-configuration-metadata元数据与additional-spring-configuration-metadata元数据区别

标签:man   http   val   pre   doc   cal   prope   value   option   

原文地址:https://www.cnblogs.com/beiifeng/p/12191325.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!