1. 首先怀疑是postMan的问题,应该可以设置编码格式,在网上看到很多都是让postMan的header中添加Accept的application/json 然而没有什么用

postMan 传入值 后端取值乱码问题2. 由于是前端传过来就是乱码,所以不必要怀疑数据库的编码,看了一下tomcat的编码,修改了一下server.xml
postMan 传入值 后端取值乱码问题新添加了tomcat的编码格式postMan 传入值 后端取值乱码问题
另外在idea中设置 VM options :-Dfile.encoding=UTF-8
重启之后发现传过来的信息不乱码了,但是tomcat在idea的控制台中文乱码了,郁闷
于是百度,发现一个可行方案
修改idea 的 idea.exe.vmoptions 和 idea64.exe.vmoptions
底部添加 -Dfile.encoding=UTF-8
重启idea即可

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2021-07-01
  • 2021-12-28
  • 2022-01-01
猜你喜欢
  • 2021-10-15
  • 2021-09-11
  • 2021-06-17
  • 2022-12-23
  • 2021-12-28
  • 2022-01-09
相关资源
相似解决方案