Setting ‘relaxedQueryChars’ for embedded Tomcat
How can I set relaxedQueryChars for Spring Boot embedded Tomcat?
The connector attribute described here, but Spring Boot documentation has no such parameter listed.
How to set Tomcat’s Connector attributes in general?
Tomcat 2.x.x 以上版本
@Component
public class MyTomcatWebServerCustomizer
implements WebServerFactoryCustomizer {
@Override
public void customize(TomcatServletWebServerFactory factory) {factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {@Overridepublic void customize(Connector connector) {connector.setAttribute("relaxedQueryChars", "yourvaluehere");}});
}
}