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 RFC 3986

@Bean
public ConfigurableServletWebServerFactory webServerFactory() {
    TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
        tomcat.addConnectorCustomizers(new TomcatConnectorCustomizer() {
            @Override
            public void customize(Connector connector) {
                connector.setProperty("relaxedQueryChars", "|{}[]");
            }
        });
    return factory;
}
posted @ 2022-10-09 18:41  leechg  阅读(40)  评论(0编辑  收藏  举报