All of our applications have a simple version.html file that our ops team manually injects into the root of the deployed application when it is built. Accessing it when navigating to http://<appath>.com/version.html has worked fine for years in our older Node and Grails apps. However, once we moved to Spring Boot 3.1.5 we can no longer access it as we used to be able to.
I found resources like:
- How to serve .html files with Spring
- How to map requests to HTML file in Spring MVC?
- How can I serve static html from spring boot?
- how to serve static content in springboot 2.2.6?
However, these all seem to indicate that I need to nest the html file within another folder for it to be picked up and hosted successfully.
After talking with the ops team, they aren’t going to be able to move the file to a new location.
So, is there any way to host the version.html right off of the root path of the app?