spring-configuration-metadata元數據與additional-spring-configuration-metadata元數據區別


參考 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中,並覆蓋掉相同的說明。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM