feat: ajp Bean 추가

This commit is contained in:
hylee 2023-06-20 16:05:58 +09:00
parent 793658638a
commit eef7461770
3 changed files with 49 additions and 4 deletions

View File

@ -0,0 +1,42 @@
package com.itn.mjonApi.cmn.config;
import org.apache.catalina.connector.Connector;
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;
/**
* packageName : com.itn.mjonApi.cmn.config
* fileName : ContainerConfig
* author : hylee
* date : 2023-06-20
* description :
* ===========================================================
* DATE AUTHOR NOTE
* -----------------------------------------------------------
* 2023-06-20 hylee 최초 생성
*/
@Configuration
public class ContainerConfig {
@Value("${server.tomcat.ajp.port}")
private int SERVER_TOMCAT_AJP_PORT;
@Bean
public ServletWebServerFactory servletContainer() {
TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
tomcat.addAdditionalTomcatConnectors(createAjpConnector());
return tomcat;
}
private Connector createAjpConnector() {
Connector ajpConnector = new Connector("AJP/1.3");
ajpConnector.setPort(SERVER_TOMCAT_AJP_PORT);
ajpConnector.setSecure(false);
ajpConnector.setAllowTrace(false);
ajpConnector.setScheme("https");
return ajpConnector;
}
}

View File

@ -17,4 +17,7 @@ logging.level.root=info
#api.root.url=http://192.168.0.125:8095/
api.root.url=http://localhost:8080/
Ganpandaup.receiver.email=hylee250@kakao.com
Ganpandaup.receiver.email=hylee250@kakao.com
server.tomcat.ajp.port=8009

View File

@ -18,6 +18,6 @@ api.root.url=https://www.munjaon.co.kr/
Ganpandaup.receiver.email=ganpan9882@kakao.com
server.tomcat.ajp.protocol=AJP/1.3
server.tomcat.ajp.port=8109
server.tomcat.ajp.enabled=true
server.tomcat.ajp.port=8109