The priority of properties, yml, and yaml in SpringBoot

principle

Configurations with lower priority will be loaded first and then overwritten by configurations with higher priority

verify

Create SpringBoot project (URL )

 Create application.properties, application.yml, application.yaml files in the resource directory

 

 

 run

 

 

in conclusion

Priority order:

properties>yml>yaml

 

Guess you like

Origin blog.csdn.net/m0_53286358/article/details/132290227
Recommended