What's the difference between an application.properties file and an application.yml file?
The benefits of YML files, the natural tree-like structure, are clear at a glance and are essentially similar to properties.
Many of the demos given by the official are configured with yml files.
Notes:
1. The original key, such as spring.jpa.properties.hibernate.dialect, press "." Split, all become tree-like configurations
2. The colon after the key must be followed by a space
3. Delete the original application.properties. Then be sure to do maven -X clean install
Example:
Finally, attach the widget you wrote to convert properties to yml format, the screenshot is as follows:
YAML, YML online formatting verification tool:http://www.bejson.com/validators/yaml/
java-tools tool download:
Tourists, if you want to see the hidden content of this post, please Reply
|