swagger
通用组件,对外提供注解@EnableSwagger
,屏蔽内部版本兼容性。
模块集成
maven
添加依赖
<dependency>
<groupId>com.kingengine.kems.base</groupId>
<artifactId>kems-base-swagger</artifactId>
</dependency>
- 添加配置
swagger:
enabled: true
base-package: com.kingengine.kems.module.system
title: SYSTEM API接口文档
description: SYSTEM API接口文档
version: 3.2.0
host: localhost
group-name: module-system
- 注解生效
在启动类或者其他configration的配置类上添加注解@EnableSwagger
@EnableSwagger
@SpringBootApplication
//其他注解
public class KeSystemApplication {
//其他代码
}