小编toc*_*eas的帖子

Spring MVC can't handle 404 from Resource Handler?

I'm using Spring MVC 4.3.11.RELEASE and have a vanilla resource handler for static resources. It's working fine - for resources that exist. However if not, it appears to return a 404 to the DispatcherServlet which is happy with that response since it found a handler. I've got ControllerAdvice for NoHandlerFoundException which works fine for controllers but isn't meant to handle this case. So Spring MVC punts completely and I get the nasty Tomcat 404 response. I can find no way …

java spring spring-mvc

5
推荐指数
1
解决办法
300
查看次数

标签 统计

java ×1

spring ×1

spring-mvc ×1