Swagger 定义UI界面

一、Swagger UI视图展示实现依赖(pom.xml)

  1.访问 http://localhost:8080/swagger-ui.html

复制代码
 <!-- swagger-ui -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.5.0</version>
        </dependency>
复制代码

 

 

  2.访问 http://localhost:8080/doc.html

复制代码
<!-- 引入swagger-bootstrap-ui包 /doc.html-->
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>1.9.1</version>
        </dependency>
复制代码

 

 

  3.访问 http://localhost:8080/docs.html

复制代码
        <!-- 引入swagger-ui-layer包 /docs.html-->
        <dependency>
            <groupId>com.github.caspar-chen</groupId>
            <artifactId>swagger-ui-layer</artifactId>
            <version>1.1.3</version>
        </dependency>
复制代码

 

 

  4.访问 http://localhost:8080/document.html

复制代码
<!-- 引入swagger-ui-layer包 /document.html-->
        <dependency>
            <groupId>com.zyplayer</groupId>
            <artifactId>swagger-mg-ui</artifactId>
            <version>1.0.6</version>
        </dependency>
复制代码

posted @ 2020-08-17 09:08  爱你爱自己  阅读(2430)  评论(0编辑  收藏  举报