Swagger2 解决 java.lang.NumberFormatException异常

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xuzailin/article/details/82535056
找到一篇说2.9.2版本的Swagger用此方法,结果不行,改为2.9.1就行了
吐下方法是忽略原版本的swagger-annotations和swagger-models,添加1.5.21版本的
<!-- Swagger2 API-->
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>2.9.1</version>
    <exclusions>
        <exclusion>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </exclusion>
        <exclusion>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-models</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.9.1</version>
</dependency>
<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-annotations</artifactId>
    <version>1.5.21</version>
</dependency>
<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-models</artifactId>
    <version>1.5.21</version>
</dependency>

猜你喜欢

转载自blog.csdn.net/xuzailin/article/details/82535056
今日推荐