Giter VIP home page Giter VIP logo

Comments (2)

scruffycoderofficial avatar scruffycoderofficial commented on July 26, 2024

Hi again,

It will seem as though I wasted your time more than I wasted mine by openning this issue. I now can be able to deploy my app on Tomcat with the changes shown below:

index d1144c7..7786250 100644
--- a/src/main/java/se/citerus/dddsample/Application.java
+++ b/src/main/java/se/citerus/dddsample/Application.java
@@ -10,12 +10,14 @@ import se.citerus.dddsample.application.util.SampleDataGenerator;
 import se.citerus.dddsample.config.DDDSampleApplicationContext;

 import javax.annotation.PostConstruct;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.support.SpringBootServletInitializer;

 @Configuration
 @Import({DDDSampleApplicationContext.class,
         PathfinderApplicationContext.class})
 @EnableAutoConfiguration
-public class Application {
+public class Application extends SpringBootServletInitializer{

     @Autowired
     SampleDataGenerator sampleDataGenerator;
@@ -28,4 +30,10 @@ public class Application {
     public static void main(String[] args) throws Exception {
         SpringApplication.run(Application.class, args);
     }
+
+    @Override
+    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder)
+    {
+        return builder.sources(Application.class);
+    }
 }

I will close this issue as I managed to have it resolved.

from dddsample-core.

scruffycoderofficial avatar scruffycoderofficial commented on July 26, 2024

Ah! And the pom file ofcourse:

diff --git a/pom.xml b/pom.xml
index 80df796..f9343f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,6 +5,7 @@
     <artifactId>dddsample</artifactId>
     <name>DDDSample</name>
     <version>2.0-SNAPSHOT</version>
+    <packaging>war</packaging>
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
@@ -166,6 +167,15 @@
             <artifactId>selenium-java</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-tomcat</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
     </dependencies>

     <reporting>

from dddsample-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.