yml file and properties file

        First of all, both can be used, the specific difference is not big, the effect is the same.

        1. The properties file is in the form of key-value, and yml is a tree structure

        2. Properties is. Connection, use = for assignment, yml is to replace. With:, and = also with:, and the assignment: there must be a space after it

        3. Properties does not have strict requirements for indentation, and yml has strict requirements for indentation

        4. The yml file supports Chinese a little bit better (someone else speaks)

        5. Each base node in yml can only have one

        6. If both of the items exist, the order of loading is to load yml first, and then load properties, that is, properties shall prevail

Compare the configuration of the following two pictures, the first one is properties, and the second one is yml:

 

 

 

Guess you like

Origin blog.csdn.net/qq_41061437/article/details/110820988