码迷,mamicode.com
首页 > 编程语言 > 详细

什么是 Spring Profiles?

时间:2020-12-03 11:31:27      阅读:5      评论:0      收藏:0      [点我收藏+]

标签:用户   height   开发   tom   注册   使用   禁用   family   lin   

Spring Profiles 允许用户根据配置文件(dev,test,prod 等)来注册 bean。因 

此,当应用程序在开发中运行时,只有某些 bean 可以加载,而在 PRODUCTION

中,某些其他 bean 可以加载。假设我们的要求是 Swagger 文档仅适用于 QA 环 

境,并且禁用所有其他文档。这可以使用配置文件来完成。Spring Boot 使得使用 

配置文件非常简单。

什么是 Spring Profiles?

标签:用户   height   开发   tom   注册   使用   禁用   family   lin   

原文地址:https://www.cnblogs.com/programb/p/12996054.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!