其他分享
首页 > 其他分享> > 解决get请求特殊字符问题

解决get请求特殊字符问题

作者:互联网

@Bean
public ServletWebServerFactory webServerFactory() {
TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
fa.addConnectorCustomizers(connector -> {
connector.setProperty("relaxedPathChars", ""<>[\]^{|}"); connector.setProperty("relaxedQueryChars", "\"<>[\\]^{|}");
});
return fa;
}

标签:TomcatServletWebServerFactory,return,请求,get,connector,fa,setProperty,特殊字符
来源: https://www.cnblogs.com/hhs-5120/p/16656855.html