有的时候接收到的参数是这样的格式,导致请求参数无法正确的映射到对象
[ERROR]-[Thread: http-nio-80-exec-9]-[com.jfinal.core.ActionHandler.handle()]: /app/genOrder?businessType=1&callback=angular.callbacks._m&carTypeId=2&distance=1870&endPoi=%7B%22province%22:%22%E6%B1%9F%E8%8B%8F%E7%9C%81%22,%22city%22:%22%E6%B7%AE%E5%AE%89%E5%B8%82%22,%22county%22:%22%E6%B7%AE%E5%AE%89%E5%8C%BA%22,%22street%22:%22%E4%BA%91%E6%9E%97%E8%B7%AF%22,%22lng%22:119.10698,%22lat%22:33.55771,%22address%22:%22%E6%B7%AE%E5%AE%89%E5%8C%BA%E5%9B%BD%E9%99%85%E8%8A%B1%E9%83%BD%E7%BB%BF%E5%9C%B0%E4%B8%96%E7%BA%AA%E5%9F%8EII%E6%9C%9F(%E6%99%AF%E4%BC%9A%E8%B7%AF)%22,%22phone%22:%22185%22%7D&needCarry=2&needReceipt=2&sign=ab12c94292cd9c1be103734eb0621704&startPoi=%7B%22province%22:%22%E6%B1%9F%E8%8B%8F%E7%9C%81%22,%22city%22:%22%E6%B7%AE%E5%AE%89%E5%B8%82%22,%22county%22:%22%E6%B8%85%E6%B1%9F%E6%B5%A6%E5%8C%BA%22,%22street%22:%22%E5%B1%B1%E9%98%B3%E6%B9%BE%E8%B7%AF%22,%22lng%22:119.119843,%22lat%22:33.563148,%22address%22:%22%E6%B8%85%E6%B1%9F%E6%B5%A6%E5%8C%BA%E5%B1%B1%E9%98%B3%E6%B9%BE%E8%8A%B1%E5%9B%AD(%E5%B1%B1%E9%98%B3%E6%B9%BE%E8%B7%AF%E5%8C%97)%22,%22phone%22:%2215951971849%22,%22contact%22:%22%E5%BE%90%E6%9D%B0%22%7D&startTime=2018-03-20+06:50&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhdXRoMCIsImV4cCI6MTUyOTQyODgzNywiaWF0IjoxNTIxNDgwMDM3LCJ1c2VySWQiOjM2OH0.aUVZPKjDI12QJ3R83l-EaWMh64P-FtK707jJdMrdn_Q&ts=1521502057132
正确的参数格式应该是以下格式:
Url : POST /app/genOrder Controller : com.ikkong.app.controller.AppController.(AppController.java:1) Method : genOrder Interceptor : org.beetl.sql.ext.jfinal.Trans.(Trans.java:1) com.ikkong.core.intercept.DoLogInterceptor.(DoLogInterceptor.java:1) com.ikkong.core.jfinal.ext.shiro.ShiroInterceptor.(ShiroInterceptor.java:1) com.ikkong.app.intercept.UserAccessApiInterceptor.(UserAccessApiInterceptor.java:1) com.jfinal.weixin.sdk.jfinal.ApiInterceptor.(ApiInterceptor.java:1) Parameter : needCarry=2 ts=1521502601579 routePoi=[] sign=22be5c1a94da491415a75bc9a6eeba2f businessType=1 token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhdXRoMCIsImV4cCI6MTUyOTQ1MTM1NywiaWF0IjoxNTIxNTAyNTU3LCJ1c2VySWQiOjk2OX0.8IkXbz5WEQSI2y_F-Az1mdETrkH-MCSKWNMIyM0crbA needReceipt=2 remark= endPoi={"address":"江苏省","building":"镇江市","city":"镇江市","contact":"","county":"","location":{"latitude":32.194708,"longitude":119.430481},"phone":"1","province":"","street":"","lat":32.194708,"lng":119.430481} startTime=2018-03-20 07:35:33 carTypeId=5 distance=305521.83507827064 startPoi={"address":"山东省临沂市兰陵县S352","building":"海尔","city":"临沂市","contact":"","county":"苍山县","location":{"latitude":34.701063,"longitude":118.08083},"phone":"13225499998","province":"山东省","street":"S352","lat":34.701063,"lng":118.08083} --------------------------------------------------------------------------------
请波总帮忙指点下,可能是哪里的问题,谢谢
项目:JFinal
大量参数传递建议用 post 请示,在 form 表单中传递参数,如果没有 form 表单可以用 js 构造这样的请求出来