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

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.

主站蜘蛛池模板: 通道| 华蓥市| 雷波县| 行唐县| 会昌县| 阜宁县| 寿宁县| 湖南省| 修水县| 辉县市| 吉安市| 洪泽县| 邯郸市| 长武县| 上饶市| 车致| 大理市| 石家庄市| 高台县| 武汉市| 米泉市| 团风县| 乌鲁木齐县| 百色市| 鸡西市| 青州市| 筠连县| 方山县| 荔浦县| 麻阳| 密山市| 弋阳县| 奉贤区| 灌云县| 临安市| 南安市| 赤水市| 泊头市| 乌拉特前旗| 休宁县| 隆回县|