首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
V2EX
›
hicfpx
›
全部回复第 1 页 / 共 1 页
回复总数
5
2015-06-04 17:55:09 +08:00
回复了
eightqueen
创建的主题
›
Java
›
spring4 mvc rest 返回中文乱码?
你返回的是json,就需要配置json converter吧
<mvc:annotation-driven>
<mvc:message-converters register-defaults="true">
<!-- 将StringHttpMessageConverter的默认编码设为UTF-8 -->
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<constructor-arg value="UTF-8" />
<property name="supportedMediaTypes" value="text/html;charset=UTF-8" />
</bean>
<!-- 将Jackson2HttpMessageConverter的默认格式化输出设为true -->
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="prettyPrint" value="true"/>
<property name="supportedMediaTypes" value="text/html;charset=UTF-8" />
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
2015-05-30 18:28:35 +08:00
回复了
Static2015
创建的主题
›
程序员
›
现在企业中 JPA 用得多么?
@
saximoer
您能说一下为什么后来不用Spring Data JPA吗
2014-12-22 12:00:23 +08:00
回复了
icedx
创建的主题
›
Evernote
›
难道 Evernote 的一切都是个阴谋?
我想问下5.8.1有人能成功同步evernote国际版么
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
实用小工具
·
860 人在线
最高记录 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms ·
UTC 22:32
·
PVG 06:32
·
LAX 15:32
·
JFK 18:32
Developed with
CodeLauncher
♥ Do have faith in what you're doing.