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 {
  //其他代码
}
Copyright © 2017-2023 深圳金证引擎科技有限公司 all right reserved,powered by Gitbook该文件最后修订时间: 2023-09-01 14:01:38

results matching ""

    No results matching ""