按照网页<http://localhost:8080/sys/dept/save.json/?name\=技术部\&seq\=1\&remark\=技术部>
relaxedPathChars="[]{}|\^"和relaxedQueryChars="[]{}|\^"的双引号内容应该怎么写?
按照https://coding.imooc.com/learn/questiondetail/34728.html的回答,在 catalina.properties最后加上tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}和org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true还是没能解决问题.
后来在网上搜,解决方案是在server.xml要加relaxedPathChars和relaxedQueryChars两个属性,但显示如下,我想应该是这两个属性的“[]{}|\^”写法有问题,不知道这个想法催不对。老师可以给我解释下吗?
2020-02-08 14:30:35.720 [http-nio-8080-exec-7] INFO com.mmall.common.HttpInterceptor - request start. url:http://localhost:8080/sys/dept/save.json/, params:{"name\\":["技术部\\"],"seq\\":["1\\"],"remark\\":["技术部"]}
2020-02-08 14:30:36.100 [http-nio-8080-exec-7] ERROR com.mmall.common.SpringExceptionResolver - unknow exception, url:http://localhost:8080/sys/dept/save.json/
com.mmall.exception.ParamException: {seq=展示顺序不可以为空, name=部门名称不可以为空}<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" URLEncoding="UTF-8" relaxedPathChars="[]{}|\^" relaxedQueryChars="[]{}|\^"/>