I am very new to the server configuration topic. I have developed my own site on Spring MVC and I want it to be on the server. I bought VPS with Ubuntu and I have set Tomcat and phpMyAdmin up here. I have packaged my Spring project as WAR by adding
<packaging>war</packaging>
to pom.xml.
I also have
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
in my pom.xml.
In Tomcat I chose my WAR file for deploy and deployed it.
But when I'm trying to enter my site (ip:port/MyWARName/) it shows
Please, save me. I will answer all the questions needed for finding root of the problem.
Solutions that I found are not effective because they are saying that I misspelled something in my URL, but there is nothing to misspell because I'm trying to get to my "/" mapping. That's how my "/" GetMapping looks like
@GetMapping("/")
public String home() {
return "redirect:/products/";
}
In fact non of my mappings work. mapping 1 mapping 2
CodePudding user response:
That's f****** amazing! Looks like Tomcat v10 doesn't support Spring boot anymore! I just switched to 8.5 and it works! Thank you, Apache, for wasting my 2 days of life!