톰캣 ajp 설정 추가.
parent
95bedc149f
commit
59577287ab
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.dbnt.faisp.config;
|
||||||
|
|
||||||
|
import org.apache.catalina.connector.Connector;
|
||||||
|
import org.apache.coyote.ajp.AbstractAjpProtocol;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||||
|
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class TomcatConfiguration {
|
||||||
|
|
||||||
|
@Value("${tomcat.ajp.protocol}")
|
||||||
|
private String protocol;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ServletWebServerFactory servletContainer() {
|
||||||
|
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
|
||||||
|
tomcat.addAdditionalTomcatConnectors(createAjpConnector());
|
||||||
|
return tomcat;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Connector createAjpConnector() {
|
||||||
|
Connector ajpConnector = new Connector(protocol);
|
||||||
|
ajpConnector.setPort(8009);
|
||||||
|
ajpConnector.setSecure(false);
|
||||||
|
ajpConnector.setAllowTrace(false);
|
||||||
|
ajpConnector.setScheme("http");
|
||||||
|
return ajpConnector;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
tomcat.ajp.protocol=HTTP/1.1
|
||||||
spring.devtools.livereload.enabled=true
|
spring.devtools.livereload.enabled=true
|
||||||
|
|
||||||
#file upload
|
#file upload
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
tomcat.ajp.protocol=HTTP/1.1
|
||||||
|
|
||||||
#file upload
|
#file upload
|
||||||
spring.servlet.multipart.location=/docker/faisp/uploadFiles
|
spring.servlet.multipart.location=/docker/faisp/uploadFiles
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue