mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 22:29:00 +08:00
⚡ 优化。 修正描述,快速禁用Swagger2
This commit is contained in:
1 parent
4d805b172a
commit
e74e713256
1 file changed
+2
+2
@@ -43,6 +43,8 @@ import java.util.List;
|
||||
/**
|
||||
* @author lengleng
|
||||
* swagger配置
|
||||
* 禁用方法1:使用注解@Profile({"dev","test"}) 表示在开发或测试环境开启,而在生产关闭。(推荐使用)
|
||||
* 禁用方法2:使用注解@ConditionalOnProperty(name = "swagger.enable", havingValue = "true") 然后在测试配置或者开发配置中添加swagger.enable=true即可开启,生产环境不填则默认关闭Swagger.
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
|
||||
Reference in new issue
Block a user