The valid characters are defined in RFC 7230 and RFC 3986

问题原因

同事在url中将json数据作为一个get请求的参数导致。tomcat版本高会出现这个问题,原因是高版本加上了http的验证。

解决办法

server.xml中加入relaxedPathChars和relaxedQueryChars参数

<Connector port="8084" protocol="HTTP/1.1" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;" useBodyEncodingForURI="true" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8"/>
原文地址:https://www.cnblogs.com/aeolian/p/13915486.html