VUE+SpringBoot POST传输报400错误(Invalid character found in the request target. The valid characters are)
2019-04-18 11:11
393 查看
1.前端报错
2.后端报错
3.请求方法
4.后端接收
报错原因是:传过来的参数比较大。若直传一个单独的参数是没有问题。
5.解决方法:在Springboot启动类中添加
6.代码如下
@Bean
public ConfigurableServletWebServerFactory webServerFactory() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
@Override
public void customize(Connector connector) {
connector.setProperty(“relaxedQueryChars”, “|{}[]”);
}
});
return factory;
}
相关文章推荐
- 错误:Invalid character found in the request target. The valid characters are defined in RFC 7230 and R
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF...
- tomcat请求参数问题解决: Invalid character found in the request target. The valid characters are defined in
- 解决:Invalid character found in the request target.The valid characters are defined in RFC 7230 and RF
- invalid character found in the request target the valid characters are defined in rfc 7230 and rfc 3
- Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF
- Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
- invalid character found in the request target the valid characters are defined in rfc 7230 and rfc
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF
- 异常:Invalid character found in the request target. The valid characters are defined in RFC 3986
- Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
- invalid character found in the request target the valid characters are defined in rfc 7230 and rfc
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 问题
- Tomcat 8 Invalid character found in the request target. The valid characters are defined in RFC 3986
- 解决Invalid character found in the request target. The valid characters are defined in RFC 7230 and RF
- Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
- Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC
- invalid character found in the request target the valid characters are defined in rfc 7230 and rfc 3