Packaging 타입 war로변경 및 tomcat연동 의존성 추가
<?xml version="1.0" encoding="UTF-8"?> <project...> ... <packaging>war</packaging> ... </project>
...
<dependencies>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency></dependencies>
...
pom.xml
ServletInitializer 구현
package com.example; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.web.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(TestApplication.class); } }
src/main/java/com.example/ServletInitializer.java
댓글 없음:
댓글 쓰기
참고: 블로그의 회원만 댓글을 작성할 수 있습니다.