When I generate a new Spring Boot app (4.0.0.M3) from start.spring.io using the "War" option, the assembled WAR will not start properly on Tomcat 11.

Steps to reproduce:

  1. Go to https://start.spring.io/ and choose: Gradle, Groovy, 4.0.0 (M3), War packaging, Java 17
  2. Add Spring Boot Actuator to the dependencies
  3. Click Generate
  4. Expand the downloaded ZIP file
  5. Add the following settings to src/main/resources/application.properties:
spring.application.name=demo
management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always
management.endpoint.health.probes.enabled=true
management.endpoint.health.group.liveness.include=ping
management.endpoint.health.group.readiness.include=ping
  1. Run .\gradlew assemble from the project root
  2. Rename the generated war in build/libs to ROOT.war
  3. Copy ROOT.war to tomcat webapps in Tomcat 11
  4. Wait for the webapp to start, then go to http://localhost:8080/actuator/health/readiness

Expected behavior: Tomcat should expand the WAR (if autodeploy is set to true) and start the webapp. Tomcat stdout log should indicate that the DispatcherServlet is initialized The readiness probe should return a 200 response with status: UP

(I verified that this procedure works in spring boot 3.5.6)

Actual behavior: The WAR is expanded, and appears to be deployed The stdout indicates that ServletInitializer started, but it does not contain an initialization message from DispatcherServlet. The readiness probe returns a 404 error.