spring boot 与spring mvc不同,在web应用中,默认的编码格式为UTF-8,而spring mvc的默认编码格式为iso-8859-1,在spring mvc中,如果设置编码格式需要在spring配置文件中加入:
<mvc:annotation-driven>
<mvc:message-converters register-defaults="true">
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<constructor-arg value="UTF-8" />
</