-
Notifications
You must be signed in to change notification settings - Fork 41.1k
[Spring Boot 3.2.0] 404 Not Found behavior #38733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Starting with Spring Framework 6.1 (which Boot 3.2.0 uses), See here for more details: https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications or this issue spring-projects/spring-framework#29491. |
No any exceptions throwed under no any ExceptionHandler configed (version: 3.1.5). |
I don't understand. What's the expected outcome and what does happen? Also Boot 3.1.5 doesn't use Spring Framework 6.1.0. |
I have not configure any global ExceptionHandler, a json responsed like below and no any exception was threw on server sider: It should throw a exception and can be caught by global ExceptionHandler, then the response can be adapted to some customized content. |
@BruceAn1978 So this is different from the issue reported here? The project provided by @infoShare has |
404 Not found behavior was changed during upgrade from 3.1.6 to 3.2.0.
Previous behavior
404 Not found error returned:
Current behavior:
NoResourceFoundException thrown with message "No static resource api/method." thrown.
Here you can find small example:
https://github.com/infoShare/code-examples/tree/main/spring-boot-404
Test ApiControllerWithProfileTest is passing on spring boot 3.1.6
but failing on spring boot 3.2.0:
The text was updated successfully, but these errors were encountered: