问题如下:
1.
Message Invalid character found in the request target [/tb/TbRecordfile/v1/list?_t=1640844375&constructionId=5&pageNo=1&pageSize=8&floorNum[]=7&userId=1442419677027749890&buildingNum=6-2&buildingId=1¤tUserId=1422835748520980481]. The valid characters are defined in RFC 7230 and RFC 3986
2.
java.lang.IllegalArgumentException: Invalid character found in the request target [/tb/TbRecordfile/v1/list?_t=1640844375&constructionId=5&pageNo=1&pageSize=8&floorNum[]=7&userId=1442419677027749890&buildingNum=6-2&buildingId=1¤tUserId=1422835748520980481]. The valid characters are defined in RFC 7230 and RFC 3986
说明也就是URL中出现特殊字符了:
(1)RFC 3986文档规定,Url中只允许包含英文字母(a-z,A-Z)、数字(0-9)、- _ . ~ 4个特殊字符以及所有保留字符。
(2)RFC3986中指定了以下字符为保留字符:! * ’ ( ) ; : @ & = + $ , / ? # [ ]
解决方案:
1.使用Tomcat7.0.69之前的版本;
2.对url的特殊字符进行转义
3.修改tomcat配置文件
4.