[org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver]-[DEBUG] Re
2018-03-20 17:02
676 查看
springmvc中规定以.html结尾的请求不会返回json数据
解决方法配置两个入口
如:
<servlet-mapping>
<servlet-name>abc</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>abc</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
解决方法配置两个入口
如:
<servlet-mapping>
<servlet-name>abc</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>abc</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
相关文章推荐
- 废弃的org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
- org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
- 废弃的org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
- Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingH
- DefaultHandlerExceptionResolver : Failed to convert request element: org.springframework.web.method.
- DefaultHandlerExceptionResolver : Failed to convert request element: org.springframework.web.method.
- Failed to instantiate [org.springframework.web.servlet.HandlerMapping]: Factory method 'webSocketHan
- org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$MappingRegistry异常的解决方法
- 使用ControllerAdvice注意事项,Ambiguous @ExceptionHandler method mapped for [class org.springframework.web.bind.MethodArgumentNotValidException]
- org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is
- spring mvc 源代码笔记1--org.springframework.web.servlet.mvc.method
- org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver: method <init>()V
- Spring MVC集成thymeleaf时提示:defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException
- Spring MVC org.springframework.web.bind.MissingServletRequestParameterException解决办法
- maven springmvc Error creating bean with name 'org.springframework.web.servlet.mvc.annotation
- springMVC:org.springframework.web.servlet.PageNotFound.handleHttpRequestMethodNotSupported Request method 'POST' not supported
- org.springframework.web.servlet.view.InternalResourceViewResolver
- SpringMVC配置拦截器出现500错误:Error creating bean with name 'org.springframework.web.servlet.handler.Mappe
- 解决SpringMvc中org.springframework.web.servlet.DispatcherServlet noHandlerFound的错误
- [无异常,才正常]java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet