r/SpringBoot • • 24d ago

Question I want professional-level performance on this point.

/r/Backend/comments/1xmkqwm/i_want_professionallevel_performance_on_this_point/
1 Upvotes

3 comments sorted by

1

u/JournalistNew7510 24d ago

The Whitelabel page means Spring found nothing mapped to that URL and fell back to its default error page. On a fresh deploy it is usually one of four things. If your controllers return a view name like "home", you need a template engine such as Thymeleaf on the classpath and the file in src/main/resources/templates, otherwise the name resolves to nothing. If the class uses the RestController annotation instead of plain Controller, the method sends back the string itself rather than rendering a page. Your controller packages also have to sit under the package of the main application class, or component scanning never picks them up. And if server.servlet.context-path is set, every link in your pages needs that prefix.

To see what is really happening, set logging.level.org.springframework.web=DEBUG and the log will show each request and which handler it matched, or add actuator and open the mappings endpoint to list every route the app knows. Setting server.error.include-message=always for a while also puts the actual reason on the error page.