Created
August 4, 2016 14:18
-
-
Save daemin-hwang/1247667f3e8e895b84ba412b9978817f to your computer and use it in GitHub Desktop.
스프링부트 프로젝트 또다른 war 웹서비스 context에 올리기
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://stackoverflow.com/questions/31374726/spring-boot-how-to-add-another-war-files-to-the-embedded-tomcat | |
| 1. 링크내용외에 아래 디펜던시 추가 필요 | |
| <dependency> | |
| <groupId>org.apache.tomcat.embed</groupId> | |
| <artifactId>tomcat-embed-jasper</artifactId> | |
| </dependency> | |
| 2. war가 배포될 경로만들어줘야 함. | |
| - 프로퍼티에 추가 server.tomcat.basedir=. | |
| - ${baseDir}/webapps 폴더 생성 | |
| 3. /resources/xxx.war 를 넣고 임베디드톰캣Config내에 아래 내용 코딩 | |
| Resource war = new ClassPathResource("managerAgent.war"); | |
| String path = war.getURI().getPath(); | |
| tomcat.addWebapp("/managerAgent", path); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment