springboot集成swagger2报Illegal DefaultValue null for parameter type integer
springboot集成swagger2,实体类中有int类型,会报“ Illegal DefaultValue null for parameter type integer”的错误
解决办法:修改pom.xml如下
<!--swagger集成--> <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.5.21</version> </dependency>