SpringMVC中的400错误,The request sent by the client was syntactically incorrect.

做~自己de王妃 提交于 2019-12-05 20:28:23

 

在其他对象属性类型一样情况下,只需要在springmvc.xml中添加配置:

<!--全局类型转型器-->
    <bean id="converter" class="com.ujiuye.common.DateTimeConverter"></bean>
    <bean id="formattingConversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
        <property name="converters">
            <set>
                <ref bean="converter"></ref>
            </set>
        </property>
    </bean>
    <mvc:annotation-driven conversion-service="formattingConversionService"/>

<mvc:annotation-driven/>

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!