Controller
@RequestMapping("ask")
@ResponseBody
public RobotResponse get(RobotRequest robotRequest){
RobotRequest.java
public class RobotRequest implements java.io.Serializable {
private cn.eastrobot.www.ws.RobotServiceEx.UserAttribute[] attributes;
UserAttribute.java
public class UserAttribute implements java.io.Serializable {
private java.lang.String name;
private java.lang.String value;
问:前台如何传值可以封装到 robotRequest中
需要前台传值,经数据封装到 robotRequest的attributes中
笔者没有办法
笔者已经找办法
localhost:8080/ask?question=你好&userId=litong&attributes[0].name=platform&attributes[0].value=weixin
不需要使用双引号将 值 引起来