Swagger报java.lang.NumberFormatException: For input string:""是由于swagger-models高版本导致,降低swagger-models版本即可
pom增加以下
<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.22</version>
</dependency>
移除springfox-swagger2里默认swagger-models并增加低版本swagger-models