springspring-boottomcatwarjava-17

Tomcat external server doesn't start my spring boot application with /jdk17 and /windows 11


Tomcat external server runs, but doesn't start my spring-boot application, even when I check the logs I don't see the spring-boot log Started this one : I tried many solution and I mentioned everythin I did bellow

:: Spring Boot :: (v3.0.6)

After creating the war file with the following properties and dependencies : -External tomcat version : apache-tomcat-9.0.75 -Packaging and properties:

<packaging>war</packaging>
<properties>
    <java.version>17</java.version>
</properties>

-Tomcat dependency

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

I changed the final file name : <finalName>wmm</finalName> Also I extended the SpringBootServletInitializer

@SpringBootApplication
public class WhereIsMyMoneyApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(WhereIsMyMoneyApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(WhereIsMyMoneyApplication.class);
    }

I believe Im using the correct path to use the application: http://localhost:8080/wmm/{....} -I have set the envirement for the JDK17 and the path variable also -And whenever I run the "catalina.bat run" command or "startup.bat", the server work perfectly on http://localhost:8080 -I checked the list of application on "localhost/manager/html" it shows that the application exists in application list -Also I tried to deploy it manualy with the Tomcat manager UI by uploading the war file and deploying it but it shows the following error : Message:
FAIL - War file [wmm.war] already exists on server I think I have set everything correct, tried many solutions but still have the same problem


Solution

  • For Spring Boot 3 and Spring framework 6, the minimum requirement is JDK17 and Tomcat 10 due to the changes of the packages from javax ( that are in Tomcat 9 ) to jakarta ( Tomcat 10 ).