Hello,
First, this problem does not appear in the case of Spring Boot 3.1.5
What I do here is to serve static content from the src\main\resources\static path.
Static content is generated with angular-cli v17, which is a simple project.
I created two simple examples, one with Spring Boot 3.1.5 in which the problem does not appear and works correctly, and one with Spring Boot 3.2.0 RC2 in which this problem can be observed.
This problem only occurs after the project is assembled with .\gradlew clean assemble and is run with java -jar .\app-sample-sb320-rc2-issue-0.0.1-SNAPSHOT.jar
In the project app-sample-sb320-rc2-issue.zip, you will find in the root, the issue-details directory, which in turn contains files:
browser-access-issue.png
Attached you will find the two archived projects:
app-sample-sb320-rc2-issue.zip
Thank you, Iulius Ciorica
Comment From: wilkinsona
Thanks for the report and sample app. This appears to be a regression caused by the new nested jar support. The problem does not occur if you switch back to the old support by adding the following to build.gradle:
tasks.named('bootJar') {
loaderImplementation = org.springframework.boot.loader.tools.LoaderImplementation.CLASSIC
}
Comment From: philwebb
@adora-tech Thanks so much for finding and raising this one before we released 3.2.0. The sample was super helpful and I think I've identified and fixed the underlying problem.
Comment From: wilkinsona
Re-opening as some of the new tests are failing on Windows. It looks like a file handle's being leaked which prevents the jar from being deleted during cleanup.