Skip to content

Instantly share code, notes, and snippets.

@ksundong
Last active April 23, 2020 10:43
Show Gist options
  • Select an option

  • Save ksundong/7c545cf7f9fd2f7891a084b190da48d9 to your computer and use it in GitHub Desktop.

Select an option

Save ksundong/7c545cf7f9fd2f7891a084b190da48d9 to your computer and use it in GitHub Desktop.
Spring Boot War Deploy

Spring Boot War Deploy하기

plugins에 추가
id 'war'

맨 밑에

bootWar {
    archiveFileName = 'ROOT.war'
}

추가하고 ./gradlew clean war -x test로 war 패키징 할 수 있음.

public class SideDishApplication extends SpringBootServletInitializer {

이렇게 해줘야 Spring이 실행됨!

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
    <Context path="/" docBase="war파일명.확장자제외하고" reloadable="true"/>
</Host>

conf/server.xml 에서 Context 설정을 해주면 해당 경로로 루트 경로를 설정해줄 수 있다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment