Skip to content

Commit

Permalink
Make war file deployable
Browse files Browse the repository at this point in the history
  • Loading branch information
k-tamura committed Aug 22, 2017
1 parent 47a6fbf commit e443382
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 24 deletions.
48 changes: 25 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@
<java.version>1.7</java.version>
</properties>

<profiles>
<!-- JRE 7 specific config elements -->
<profile>
<id>jre7</id>
<properties>
<jvm.args>-XX:MaxPermSize=64m -Xloggc:logs/gc.log</jvm.args>
<derby.version>10.12.1.1</derby.version>
</properties>
</profile>
<!-- JRE 8 specific config elements -->
<profile>
<id>jre8</id>
<!-- activates jre8 by default -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<jvm.args>-XX:MaxMetaspaceSize=64m -Xloggc:logs/gc_%p_%t.log -XX:NativeMemoryTracking=summary</jvm.args>
</properties>
</profile>
</profiles>
<profiles>
<!-- JRE 7 specific config elements -->
<profile>
<id>jre7</id>
<properties>
<jvm.args>-XX:MaxPermSize=64m -Xloggc:logs/gc.log</jvm.args>
<derby.version>10.12.1.1</derby.version>
</properties>
</profile>
<!-- JRE 8 specific config elements -->
<profile>
<id>jre8</id>
<!-- activates jre8 by default -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<jvm.args>-XX:MaxMetaspaceSize=64m -Xloggc:logs/gc_%p_%t.log -XX:NativeMemoryTracking=summary</jvm.args>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -86,6 +86,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
Expand All @@ -106,7 +107,7 @@
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby.version}</version>
<version>${derby.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -145,6 +146,7 @@
</dependencies>

<build>
<finalName>ROOT</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e443382

Please sign in to comment.