最近碰到一个妖孽问题.前端后端都没动过。但是前端访问后台得时候一直报java.net.SocketException: sendto failed: ECONNRESET (Connection reset by peer),问题见下图

参数是带在url当中,并且有不同得符号,"",{,},等。后来经过测试只有{}传到后台会报400参数错误。于是网上找了文章
使用Tomcat传url地址中包含大括号{}的特殊字符无法识别问题多种解决方法
需要在tomcat下得conf下得catalina.properties下修改,见下图

如此修改就解决了问题

400错误变成了500,500是我后台测试,服务器报异常而已。修改下就OK。问题得到解决。
网友评论