Springboot Learning to 3: core profile

Introduction core profile

SpringBoot use a global configuration file, the configuration file name is fixed

  • application.properties
  • application.yml

Profile role: Modify the default value SpringBoot auto-configuration; SpringBoot on the ground floor gave us automatically configured;

The basic syntax of the YML

Yamla (Yamla Is not Markup Language)

  • YAML markup language
  • YAML isn't Markup Language

Markup Language:

  • Previous profile, mostly using a configuration file to do xxx.xml
  • YAML: data-centric, more suitable than other types of configuration files

Properties injection mode

Profiles load order

Guess you like

Origin www.cnblogs.com/wbyixx/p/11832618.html