From e443382e7e6703f279625391d675e2e29fbf8a1b Mon Sep 17 00:00:00 2001 From: Kohei Date: Tue, 22 Aug 2017 23:33:13 +0900 Subject: [PATCH] Make war file deployable --- pom.xml | 48 ++++++++++--------- .../easybuggy4sb/Easybuggy4sbApplication.java | 9 +++- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index dfff967..824c7a3 100644 --- a/pom.xml +++ b/pom.xml @@ -24,28 +24,28 @@ 1.7 - - - - jre7 - - -XX:MaxPermSize=64m -Xloggc:logs/gc.log - 10.12.1.1 - - - - - jre8 - - - true - - - -XX:MaxMetaspaceSize=64m -Xloggc:logs/gc_%p_%t.log -XX:NativeMemoryTracking=summary - - - - + + + + jre7 + + -XX:MaxPermSize=64m -Xloggc:logs/gc.log + 10.12.1.1 + + + + + jre8 + + + true + + + -XX:MaxMetaspaceSize=64m -Xloggc:logs/gc_%p_%t.log -XX:NativeMemoryTracking=summary + + + + org.springframework.boot @@ -86,6 +86,7 @@ org.springframework.boot spring-boot-starter-tomcat + provided @@ -106,7 +107,7 @@ org.apache.derby derby - ${derby.version} + ${derby.version} @@ -145,6 +146,7 @@ + ROOT org.springframework.boot diff --git a/src/main/java/org/t246osslab/easybuggy4sb/Easybuggy4sbApplication.java b/src/main/java/org/t246osslab/easybuggy4sb/Easybuggy4sbApplication.java index 774699f..970a368 100644 --- a/src/main/java/org/t246osslab/easybuggy4sb/Easybuggy4sbApplication.java +++ b/src/main/java/org/t246osslab/easybuggy4sb/Easybuggy4sbApplication.java @@ -3,16 +3,23 @@ import org.apache.catalina.servlets.DefaultServlet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.boot.web.support.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; @SpringBootApplication -public class Easybuggy4sbApplication { +public class Easybuggy4sbApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(Easybuggy4sbApplication.class, args); } + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Easybuggy4sbApplication.class); + } + @Bean public ServletRegistrationBean servletRegistrationBean() { final DefaultServlet servlet = new DefaultServlet();