且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HTTP状态400-错误的请求问题

更新时间:2021-12-01 00:23:28

请在dispatcher-servlet.xml中定义额外的命名空间

Please, define extra namespace in dispatcher-servlet.xml

<beans
    ... 
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    ...
    xsi:schemaLocation="
    ...
    http://www.springframework.org/schema/mvc 
    http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

添加<mvc:annotation-driven/>以启用注释驱动并支持格式化日期等字段.

Add <mvc:annotation-driven/> to enable annotation-driven and support for formatting Date etc. fields.