<!-- UTF8解决乱码问题 --> <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name="messageConverters"> <list> <bean class="org.springframework.http.converter.StringHttpMessageConverter"> <property name="supportedMediaTypes"> <list> <value>text/html;charset=UTF-8</value> </list> </property> </bean> </list> </property> </bean>
sping-mvc.xml 中增加上面的代码,放到mvc:annotation-driven 节点上面,问题解决!
时间: 2024-10-16 04:10:29