package com.stylefeng.guns;
|
|
import org.slf4j.Logger;
|
import org.slf4j.LoggerFactory;
|
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
import org.springframework.context.annotation.Bean;
|
|
/**
|
* SpringBoot方式启动类
|
*
|
* @author stylefeng
|
* @Date 2017/5/21 12:06
|
*/
|
@SpringBootApplication
|
public class GunsApplication {
|
|
private final static Logger logger = LoggerFactory.getLogger(GunsApplication.class);
|
|
public static void main(String[] args) {
|
SpringApplication.run(GunsApplication.class, args);
|
logger.info("GunsApplication is success!");
|
}
|
@Bean
|
public ConfigurableServletWebServerFactory webServerFactory() {
|
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
|
factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]\\"));
|
return factory;
|
}
|
}
|