idea setting 搜索 file encoding 把所有编码改为utf-8就好了
tomcat输出的乱码问题,是因为有的jdk编码class文件不按照idea规定执行,就会乱码
只要在tomcat的VM选项输入指定的字符集就好了
get乱码问题
不同字符集的字符放在了 url中,需要在tomcat的config配置文件中修改URIencoding="UTF-8"
post乱码问题
在后端使用 req.setEncoding 用相同的字符集来解析请求体
向客户端发送时出现乱码
使用
resp.setContentType("text/html;UTF-8");
或者
resp.setCharacterEncoding("UTF-8");
指定字符集
一般前端来适应后端,因为前端客户使用什么字符集是不确定的
推荐阅读:
vue.js:634 [Vue warn]: Property or method "userName" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See:
状态码:415,发送HTTP请求返回415状态码的解决办法
SpringBoot 整合 webapp时 访问404的解决办法
Vue 打开页面时就加载方法,例如查询
SpringCloud怎么调用多个服务的信息
Spring整合Mybatis
SpringCloud 加入 thymleaf前端页面的方法
Controller之间的跳转
Spring AOP的实现原理
This may be the result of an unspecified view, due to default view name generation
行动消除疑虑