Detailed explanation of spring boot configuration file (summary)

Spring boot provides two common configuration files: properties file and YML file. Their role is to modify the default value of spring boot automatic configuration. Compared with the properties file, the YML file is younger and has many holes. It can be described as success or failure. YML using spaces to determine the hierarchical relationship is a clear configuration file structure, but it will also destroy the hierarchical relationship because of insignificant spaces. This chapter focuses on the syntax of YML and the value from the configuration file. What are you waiting for? Come and study!

Technology: yaml, properties syntax, the use of configurationproperties and value annotations, and the use of configuration file placeholders

Note: this chapter focuses on the syntax of yaml and the use of configurationproperties annotation, test code and complete code. Please move to GitHub. If you like, you can click star.

Source code: https://github.com/ITDragonBlog/daydayup/tree/master/SpringBoot/spring-boot-yml

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>