Question
See below code Asked to write a petition application. It needs to go through Jenkins pipeline, be packaged in a .war file and be deployed
See below code Asked to write a petition application. It needs to go through Jenkins pipeline, be packaged in a .war file and be deployed in a tomcat container through EC2. When I added the Tomcat dependencies and archives in POMS the application stopped working. Why?
Thanks for the help. Should be no URLs
Main Petition application
package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class PetitionApplication { public static void main(String[] args) { SpringApplication.run(PetitionApplication.class, args); } }
Petition Controller
package com.example.demo; import com.example.demo.Petition; import com.example.demo.Signature; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.boot.SpringApplication; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @SpringBootApplication @Controller public class PetitionController { private List
ServletInitlizer
package com.example.demo; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(PetitionApplication.class); } }
POMS
"1.0" encoding="UTF-8"?> There are 3 Steps involved in it See step-by-step solutions with expert insights and AI powered tools for academic successStep by Step Solution
Step: 1
Get Instant Access to Expert-Tailored Solutions
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started