profiles:active: dev
时间: 2023-08-27 21:04:27 浏览: 107
在YML文件中,"profiles: active: dev"是用来指定激活的环境配置的。这意味着当前的配置文件将使用"dev"环境的配置。\[1\]在Spring Boot全局配置文件中,可以通过设置"spring.profiles.active"属性来激活指定的环境配置。具体的步骤是在全局配置文件中添加以下内容: "spring: profiles: active: dev"。\[2\]这样做可以实现在不同的运行时环境下部署应用程序,并根据需要自动加载相应的配置文件。\[3\]
#### 引用[.reference_title]
- *1* [profile多环境配置](https://blog.csdn.net/grow_/article/details/123707433)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [学习Springboot——Profiles多环境配置(一)](https://blog.csdn.net/qq_45979629/article/details/107903376)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文