我们在使用java开发的IDEA开发工具的时候,我们经常会使用swagger工具包进行接口的验证,
在本地使用debug运行的时候:
报错: 解决 Illegal DefaultValue null for parameter type integer 异常
报错原因:缺少指定版本的swagger-annotations 和 swagger-models 依赖
修改:
在pom.xml文件中增加依赖:
<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>
更新maven -D clean
重新导入模块即可,再运行已经无异常