springboot loading configuration file

1. The code for springboot to load the configuration file is in.

    1. The loadIntoGroup method of ConfigFileApplicationListener

    2. There are file and classpath loading methods. There are also various load directories. Please dibug for details

    3, the loading file format has xml. yml, with pro

    ,4, to load the yml file, you must rely on the snakeyaml package, without the snakeyaml package, you cannot load the yml configuration file

 

PropertySourcesLoader.addPropertySource()

PropertySourcesLoader.propertySources All loaded configuration goes into this property.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326621244&siteId=291194637