标签:depend bug code dep ble 字符 问题 错误信息 property
SpringBoot-2.2.1.RELEASE 集成 Swagger-UI时,每次在访问到页面时总是报AbstractSerializableParameter类的异常错误,大概内容如下:
这里集成的POM信息是:
<!--引入swagger-ui 2.9.2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
查找网上资料,说是代码bug问题,大概是说Swagger每一个@ApiModelProperty注解里example属性都会进行非空判断,但是它在判断的语句里只判断了null的情况,没有判断是空字符串的情况,所以解析数字的时候就会报这个异常.....
需要添加新的依赖,修改POM信息如下:
<!--引入swagger-ui 2.9.2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
参考资料:https://www.jianshu.com/p/7fdac1e94086
关于Swagger会报AbstractSerializableParameter类的异常问题
标签:depend bug code dep ble 字符 问题 错误信息 property
原文地址:https://www.cnblogs.com/andy020/p/12088423.html