|
|
|
@ -2,11 +2,13 @@ package org.jeecg;
|
|
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.catalina.Context;
|
|
|
|
|
import org.apache.catalina.connector.Connector;
|
|
|
|
|
import org.apache.tomcat.util.scan.StandardJarScanner;
|
|
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
|
|
|
|
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
|
|
|
|
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
|
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
|
|
|
|
import org.springframework.context.ConfigurableApplicationContext;
|
|
|
|
@ -48,11 +50,22 @@ public class JeecgSystemApplication extends SpringBootServletInitializer {
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public TomcatServletWebServerFactory tomcatFactory() {
|
|
|
|
|
return new TomcatServletWebServerFactory() {
|
|
|
|
|
|
|
|
|
|
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(){
|
|
|
|
|
@Override
|
|
|
|
|
protected void postProcessContext(Context context) {
|
|
|
|
|
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
factory.addConnectorCustomizers(new TomcatConnectorCustomizer() {
|
|
|
|
|
@Override
|
|
|
|
|
public void customize(Connector connector) {
|
|
|
|
|
connector.setProperty("relaxedPathChars", "\"<>[\\]^`{|}");
|
|
|
|
|
connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return factory;
|
|
|
|
|
}
|
|
|
|
|
}
|