NutzCN Logo
问答 GET和POST请求参数获取问题
发布于 2541天前 作者 chafferer 3076 次浏览 复制 上一个帖子 下一个帖子
标签:

正常不加·@AdaptBy(type = JsonAdaptor.class)· 的,GET请求可以取得参数,POST 不可以,
加了·@AdaptBy(type = JsonAdaptor.class)· ,POST取得到了,GET不行
有什么方法可以同时两种都可以满足取得参数吗

@At
	// @AdaptBy(type = JsonAdaptor.class)
	public Object query( @Param("airportcode")String airportcode,@Param("..")Pager pager) {
		ResponseCode res = responseCodeService.query(Msg.OK.getCode());
		HashMap<String,Object> hs = new HashMap<String,Object>();
		hs.put("data", aiisAirportService.query(airportcode, pager));
		res.setAttr(hs);
		return res;
	}
2 回复

那前端就别发post json了, 用普通表单

暂时就后端 写个post get方法各一个把,路径一样就好把(无奈)

添加回复
请先登陆
回到顶部