From 9065513bbeced442891ad2f8b8612fe41586a834 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Wed, 9 Sep 2020 02:06:16 +0300 Subject: [PATCH] Add support for independent Tomcat deployment Signed-off-by: Pekka Helenius --- bookstore/pom.xml | 13 +++++++------ .../fjordtek/bookstore/BookstoreApplication.java | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bookstore/pom.xml b/bookstore/pom.xml index 0a9dfb0..e2f2344 100644 --- a/bookstore/pom.xml +++ b/bookstore/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 war @@ -7,7 +8,7 @@ org.springframework.boot spring-boot-starter-parent 2.2.4.RELEASE - + com.fjordtek.bookstore Bookstore @@ -29,12 +30,12 @@ org.springframework.boot spring-boot-starter-web - + - org.springframework.boot - spring-boot-starter-thymeleaf + org.springframework.boot + spring-boot-starter-thymeleaf - + org.springframework.boot spring-boot-starter-test diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java b/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java index 8b03f0a..6027614 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/BookstoreApplication.java @@ -2,9 +2,10 @@ package com.fjordtek.bookstore; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication -public class BookstoreApplication { +public class BookstoreApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(BookstoreApplication.class, args);