You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controller MappingHandler 实现类里面,如下代码报错
报错行:
Type body0Type = new TypeWrapper(){}.getType();
log:
java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
/** ---------- Building Parameters ---------- **/
CallJsFuncDTO body0 = null;
if (converter != null && requestBody != null) {
Type body0Type = new TypeWrapper<CallJsFuncDTO>(){}.getType();
InputStream stream = requestBody.stream();
MediaType mimeType = requestBody.contentType();
body0 = converter.convert(stream, mimeType, body0Type);
}
if (body0 == null) {
throw new BodyMissingException();
}
Object o = ((WebController)mHost).callJsFunc(body0);
return new ObjectView(true, o);
===================================
data class CallJsFuncDTO(
@SerializedName("funcName") val funcName: String = "",
@SerializedName("params") val params: Any? = null,
)
//Controller
@PostMapping("/callJsFunc")
fun callJsFunc(@RequestBodydto: CallJsFuncDTO): ResultRepose {}
The text was updated successfully, but these errors were encountered:
Controller MappingHandler 实现类里面,如下代码报错
报错行:
Type body0Type = new TypeWrapper(){}.getType();
log:
java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
/** ---------- Building Parameters ---------- **/
===================================
data class CallJsFuncDTO(
@SerializedName("funcName") val funcName: String = "",
@SerializedName("params") val params: Any? = null,
)
//Controller
@PostMapping("/callJsFunc")
fun callJsFunc(@RequestBodydto: CallJsFuncDTO): ResultRepose {}
The text was updated successfully, but these errors were encountered: