解决报错:
Invalid character found in the request target. The valid characters are defined in RFC****
//2.x @Bean public ConfigurableServletWebServerFactory webServerFactory() { TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(); factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]")); return factory; } //1.x @Bean public EmbeddedServletContainerFactory webServerFactory() { TomcatEmbeddedServletContainerFactory factory = new TomcatEmbeddedServletContainerFactory(); factory.addConnectorCustomizers( (TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]")); return factory; }