외부 Tomcat 의존 제거 및 내장 실행 구성

JSP 화면을 유지하면서 java -jar로 실행할 수 있도록 내장 Tomcat과 Jasper를 포함한다.

외부 WAS용 ServletInitializer와 web.xml을 제거하고 쿠키 필터를 Spring Bean으로 등록한다.

중복 Maven 의존성을 정리하고 실행 방법을 README에 추가한다.
This commit is contained in:
한강욱
2026-08-17 00:05:52 +09:00
parent 48ab6d03ad
commit c239e02410
5 changed files with 40 additions and 156 deletions
+11 -48
View File
@@ -11,6 +11,7 @@
<groupId>com.ns.mobile</groupId>
<artifactId>nsmobile-website</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!-- JSP 뷰를 포함하면서 java -jar로 실행하기 위한 Spring Boot 실행형 WAR -->
<packaging>war</packaging>
<name>nsmovile-website</name>
<description>nsmobile project for Spring Boot</description>
@@ -130,17 +131,24 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<optional>true</optional>
</dependency>
<!-- JSP를 사용하는 독립 실행형 Spring Boot WAR에 필요한 JSP 엔진 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
@@ -176,13 +184,6 @@
<version>3.15.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>2.4.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.mervick/aes-everywhere-java -->
<dependency>
<groupId>com.github.mervick</groupId>
@@ -229,13 +230,6 @@
<version>5.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-taglibs -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-taglibs</artifactId>
<version>5.5.0</version>
</dependency>
<!-- DB Logback -->
<dependency>
<groupId>org.bgee.log4jdbc-log4j2</groupId>
@@ -250,12 +244,6 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
@@ -264,37 +252,12 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
</dependency>
</dependencies>
<build>