官术网_书友最值得收藏!

YAML for properties

Spring Boot supports YAML for properties as an alternative to properties files. YAML is convenient for hierarchical configuration data. Spring Boot properties are organized in groups, for example, server, database, and so on.

Let's see the following properties:

  • In application.properties:
database.host = localhost 
database.user = admin
  • In application.yml:
database:  
   host: localhost 
   user: admin 

Let's see, in the following section, how to define multiple profiles in a single YAML file.

主站蜘蛛池模板: 河西区| 耿马| 灵丘县| 泗水县| 民权县| 景泰县| 马公市| 江孜县| 当涂县| 武宣县| 长顺县| 瑞金市| 都昌县| 垣曲县| 从江县| 宁波市| 黄陵县| 忻州市| 丰台区| 星座| 甘孜县| 丰城市| 双江| 永清县| 安图县| 寻乌县| 阿城市| 荥阳市| 老河口市| 三原县| 广河县| 郴州市| 阳东县| 喀喇| 宁化县| 清水河县| 霍山县| 晋江市| 兰考县| 洛宁县| 通辽市|