错误代码: HTTP Status 400 - type Status report message description The request sent by the client was syntactically incorrect. Apache Tomcat/7.0.47 原因: 400 请求出错 由于语法格式有误,服务器无法理解此请求.不作修改,客户程序就无法重复此请求.在 SpringMVC 中的 Action 中处理前台 ajax 请求传过来的 json 数据直接转成对应的实
方法1:可以使用@ControllerAdvice增强Controller @ControllerAdvice public class BaseControllerAdvice { // 初始化绑定 @InitBinder public void initBinder(WebDataBinder binder) { //处理表单数据转换对象异常(Date) binder.registerCustomEditor(Date.class, new CustomDateEditor(new Simp
如何访问项目中的静态资源? 一.springmvc springmvc中访问静态资源,如果DispatcherServlet拦截的为"",那么静态资源的访问也会交给DispatcherServlet处理,就会因为找不到资源的映射出现404的问题: No mapping found for HTTP request with URI [/templates/file/test.xlsx] in DispatcherServlet with name 'dispatcherServlet'