968 Star 2.1K Fork 1.1K

TinyFramework / tiny

 / 详情

service对数组支持优化

已完成
成员
创建于  
2015-09-30 15:49

场景:servicejson/servicepage中传入数组。
如果数组长度大于1,正常。
如果数组长度为1,
出现参数类型不匹配。异常如下:
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:282)
at org.tinygroup.service.ServiceProxy.execute(ServiceProxy.java:153)
... 43 more

评论 (3)

a是个int数组。
a长度为1的时候,在request中是个数组,在webContext中是个int。

已解决。
约定以_array结尾。实际处理中将_array去除放入上下文。

状态更改为 已关闭

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
127485 wwyu8901 1578918776
Java
1
https://gitee.com/tinyframework/tiny.git
git@gitee.com:tinyframework/tiny.git
tinyframework
tiny
tiny

搜索帮助

344bd9b3 5694891 D2dac590 5694891