-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Closed
Copy link
Description
Steps to reproduce:
- Create basic Spring Boot project via this link start.spring.io
- Add basic controller, e.g.
package com.example.demo;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class RootController {
@GetMapping("/")
public ResponseEntity<String> index() {
return ResponseEntity.ok("Hello World");
}
}- Build boot war
./gradlew bootWar - Copy to
build/libs/demo-0.0.1-SNAPSHOT.warto Tomcatwebappsdirectory, e.g.
cp build/libs/demo-0.0.1-SNAPSHOT.war $TOMCAT_HOME/webapps/demo.war- Start Tomcat
- Open
http://localhost:8080/demoin a web browser or usecurl http://localhost:8080/demo/from command line.
Expected
The text Hello World should be shown.
Actual
A 404 error is shown.
Notes/Observations
- When changing to Spring Boot 3.5.5 it is working as expected.
- Running with the embedded tomcat server, e.g.
java -jar build/libs/demo-0.0.1-SNAPSHOT.war, is working as expected. - Running with
./gradlew bootRunis working as expected.
Environment
- macOS 15.6
- Java 24.0.2 (Azul)
- Tomcat 11.0.10
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement