Closed ZerosLifeCycle closed 5 years ago
我也遇到了,请问如何解决
换低一个版本
解决了,十分感谢😊
换低一个版本
spring boot还是swagger?
@gongpu swagger
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
<groupId>com.spring4all</groupId>
<artifactId>swagger-spring-boot-starter</artifactId>
<version>1.7.0.RELEASE</version>
</dependency>
spring-boot 1.5.6.RELEASE
对应
swagger-spring-boot-starter 1.7.0.RELEASE
没问题。1.7.1 RELEASE 会有问题
开发环境 springCloudVersion=Finchley.RELEASE springBootVersion=2.0.3.RELEASE springIoVersion=Cairo-SR2
使用kotlin开发。填了基本配置,请求页面报错:
java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_151] at java.lang.Long.parseLong(Long.java:601) ~[na:1.8.0_151] at java.lang.Long.valueOf(Long.java:803) ~[na:1.8.0_151] at io.swagger.models.parameters.AbstractSerializableParameter.getExample(AbstractSerializableParameter.java:395) ~[swagger-models-1.5.18.jar:1.5.18] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151] at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:687) [jackson-databind-2.9.6.jar:2.9.6] at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:719) [jackson-databind-2.9.6.jar:2.9.6] at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155) [jackson-databind-2.9.6.jar:2.9.6]...
大概看了下是 AbstractSerializableParameter 中的 example 为空字符串