Question
I want to run the below petition application but it now reads - I have to archive it as a war file using tomcat and
I want to run the below petition application but it now reads - I have to archive it as a war file using tomcat and deploy it. have jenkins pipeling running as will.
Why? how do I fix it?
Main - PetitionApplication
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); } }
PetitionController
package com.example.demo; import com.example.demo.Petition; import com.example.demo.Signature; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @Controller public class PetitionController { private List
POMS
Petition
package com.example.demo; import java.util.List; public class Petition { private static int idCounter = 1; private int id; private String title; private String content; private List
ServletInitilizer
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); } }
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sat Dec 16 12:40:59 GMT 2023 There was an unexpected error (type=Not Found, status=404). Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sat Dec 16 12:40:59 GMT 2023 There was an unexpected error (type=Not Found, status=404)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
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