Tomcat在请求目标中找到无效字符。有效字符在RFC 7230和RFC 3986中定义
tomcat安装目录,\tomcat-8.5.66\conf 文件夹下 有个 server.xml 文件,找到 <connector> 标签,在后面添加以下:
向server.xml 中Connector添加
relaxedPathChars="|{}[],%" relaxedQueryChars="|{}[],%"
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" relaxedPathChars="|{}[],%" relaxedQueryChars="|{}[],%"/>