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

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

 

在其他对象属性类型一样情况下,只需要在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/>

 

 

上一篇:Mysql 插入中文错误:Incorrect string value: '\xE7\xA8\x8B\xE5\xBA\x8F...' for column '


下一篇:Mysql 解决emoji表情处理问题 - Incorrect string value: '\xF0\x9F\x92\x94' for column