Skip to content

简化swagger集成,支持配置化启动。

Notifications You must be signed in to change notification settings

purgebug/swagger-spring-boot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swagger-spring-boot

qq交流群:812321371

简介:

  • 集成swagger前端接口文档

使用说明:

添加依赖

<dependency>
  <groupId>com.purgeteam</groupId>
  <artifactId>swagger-spring-boot-starter</artifactId>
  <version>0.1.0.RELEASE</version>
</dependency>

1. @EnableSwaggerPlugins特性

配置swagger.properties文件

  • 创建 swagger.properties 配置文件 到自己模块的resources目录下 更改swagger.properties配置

  • swagger.properties 介绍

swagger.basePackage="swagger扫描项目包路径"
swagger.title="swagger网页显示标题"
swagger.description="swagger网页显示介绍"

启动类添加@EnableSwaggerPlugins注解。

@EnableSwaggerPlugins
@SpringBootApplication(scanBasePackages = {"io.deepblueai.frontdemo.service"})
public class FrontDemoApplication {

  public static void main(String[] args) {
    SpringApplication.run(FrontDemoApplication.class, args);
  }

}

访问http://ip:端口/swagger-ui.html检查swagger-ui是否正常。

About

简化swagger集成,支持配置化启动。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 47.8%
  • HTML 32.2%
  • JavaScript 20.0%