diff --git a/src/main/java/com/itn/mjonApi/cmn/config/ContainerConfig.java b/src/main/java/com/itn/mjonApi/cmn/config/ContainerConfig.java new file mode 100644 index 0000000..fc8c283 --- /dev/null +++ b/src/main/java/com/itn/mjonApi/cmn/config/ContainerConfig.java @@ -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; + } + +} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 44f3fcd..1692c2a 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -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 \ No newline at end of file +Ganpandaup.receiver.email=hylee250@kakao.com + + +server.tomcat.ajp.port=8009 \ No newline at end of file diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties index db684fc..b2824f7 100644 --- a/src/main/resources/application-prod.properties +++ b/src/main/resources/application-prod.properties @@ -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 \ No newline at end of file + + +server.tomcat.ajp.port=8109 \ No newline at end of file