FAQ
Questions and answers about using and debugging Problem4J Spring.
Accessing unregistered HTTP path doesn't return proper response body
- In Spring Boot versions before
3.2.0, Spring WebMVC required setting following property forNoHandlerFoundExceptionto ever be thrown.Seespring.mvc.throw-exception-if-no-handler-found=trueorg.springframework.boot.autoconfigure.web.servlet.WebMvcPropertiesclass to debug it yourself. - By default, Spring Boot includes mappings to static resources. If you want to disable them and make Spring return 404
on
src/main/resources/static/*(and others), set following property.Seespring.web.resources.add-mappings=falseorg.springframework.boot.autoconfigure.web.SpringWebPropertiesclass to debug it yourself.
Messages of jakarta.validation errors are localized
Property spring.web.locale-resolved default has accept_header, to prioritize Accept header. Consider updating it
as it follows.
spring.web.locale=en_US
spring.web.locale-resolver=fixed
See org.springframework.boot.autoconfigure.web.SpringWebProperties class to debug it yourself.