400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

 => 问题:访问某地址时,

            报错(HTTP Status 400-The request sent by the client was syntactically incorrect.)

400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

=> 分析: 报400一般有两种可能:一是语义有误,当前请求无法被服务器理解;二是请求参数有误。

-> 数据库表: 列id应该是“3015”

400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

-> 前端页面:传参数id时,因为是千位数加了逗号,为“3,015”

 400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

-> 把“3,015”传到后台,后台不能识别,返回400给浏览器 

400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

=>解决:页面使用的是freemarker,应该对数字做格式化处理,以下配置 :

在freemarker的配置对象中配

400-The request sent by the client was syntactically incorrect(一种可能->freemarker数字格式化异常)

End… 

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
相关推荐
  • 暂无相关文章
  • 评论 抢沙发

    请登录后发表评论

      暂无评论内容