Swagger

作者: 拆东墙丶 | 来源:发表于2021-06-10 18:26 被阅读0次

    1.引入依赖
    <dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <exclusions>
    <exclusion>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    </exclusion>
    </exclusions>
    <version>2.9.2</version>
    </dependency>
    <dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>20.0</version>
    <scope>compile</scope>
    </dependency>
    <dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.9.2</version>
    </dependency>

    2.SwaggerConfig.java配置类
    3.对应请求Controller加注解

    参考链接https://www.jianshu.com/p/a0caf58b3653

    相关文章

      网友评论

          本文标题:Swagger

          本文链接:https://www.haomeiwen.com/subject/aolpeltx.html