天天看点

Spring Boot 加载properties和yml配置文件

一、系统启动后注入配置

需要在ApplicationContext中注册配置

用以下方式取值

email.yml文件配置如下:

So, you can put below property on external file and give the file through command line option --config.location=/some/path/app.properties