当前位置:网站首页>Effectively solve the problem of garbled code when idea runs the web project (with detailed steps)
Effectively solve the problem of garbled code when idea runs the web project (with detailed steps)
2022-07-26 02:19:00 【Weilai feather ink】
IDEA function web The problem of garbled code in the project can be effectively solved ( Detailed steps are attached )
Catalog
Error reporting interface
Use IDEA When running code , There is a garbled code , As shown in the figure below :
resolvent
Use IDEA When running code , There are often all kinds of garbled codes , It's not console garbled 、 Log garbled is web garbled . The solution is to change them into UTF-8 Coding format , We can solve this problem .
The detailed steps
1. modify tomcat Log code .
- Open it with diary or other software tomcat-conf The log file inside logging.properties;

- take GBK Change the format to UTF-8, Replace (notepad++ The shortcut key for the replacement concept of is “ctrl+H”) After that, it is as follows :

2、 solve IDEA The console is garbled .
In the menu bar , choice Run - > Edit Configurations, And then in VM options: Input in **-Dfile.encoding=UTF-8**, And then click Apply -> OK.

open IntelliJ IDEA Installation directory bin Under folder idea.exe.vmoptions and idea64.exe.vmoptions These two documents .
Add **-Dfile.encoding=UTF-8**, Here's the picture .
Remember to click save .

stay IDEA Select in window File -> Setting -> Editor ->File Encodings, Set the following three items to UTF-8 Format , Click on Apply -> OK.

restart IDEA Editor , At the same time, empty the cache in the browser , There will be no coding problems in the future . If it doesn't work , Just rush to the first step and change to GBK Try again . Clear browser cache , Take Google browser for example , Steps are as follows : Click on the three points in the upper right corner —> More tools —> Clear browsing data .

Then reopen IDEA function web project , Solve the problem of disorderly code .
边栏推荐
- Ti AM335X工控模块矩阵键盘电路的设计与驱动移植
- 博云容器云、DevOps 平台斩获可信云“技术最佳实践奖”
- prometheus+redis-exporter+grafana 监控redis服务
- Postman reported JSON serialization error
- National standard gb28181 protocol video platform easygbs message pop-up mode optimization
- LeetCode_ Dynamic programming_ Medium_ 264. Ugly number II
- 墨天轮高分技术文档分享——数据库安全篇(共48个)
- Error reporting caused by local warehouse
- Adruino 基础实验学习(一)
- 1. Mx6ul core module serial WiFi test (VIII)
猜你喜欢

Niuke net question brushing training (I)

Adruino basic experimental learning (I)

i.MX6ULL SNVS电源域GPIO状态保持验证

微信小程序解密并拆包获取源码教程
![[cloud native] 4.1 Devops foundation and Practice](/img/09/5423540d0a4a11bc7162c5ab343a4d.png)
[cloud native] 4.1 Devops foundation and Practice

What does the Red Cross in the SQL editor mean (toad and waterdrop have been encountered...)

Ti am335x industrial control module uses the Debian system of beaglebone (BBB)

主键B+ Tree,二级索引B+ Tree及对应的查询过程分析

Bo Yun container cloud and Devops platform won the trusted cloud "technology best practice Award"

prometheus+redis-exporter+grafana 监控redis服务
随机推荐
Turn: do the right thing efficiently
Kaggle registration method to solve the problem of man-machine verification
MySQL(4)
Prometheus + redis exporter + grafana monitor redis service
[paper reading] coat: CO scale conv attentional image transformers
Primary key b+ tree, secondary index b+ tree and corresponding query process analysis
Ggplot2 learning summary
[2020] [paper notes] growth of bi2te3/cofeb double-layer heterojunction by magnetron sputtering——
博云容器云、DevOps 平台斩获可信云“技术最佳实践奖”
还在用==0 null equal 判断空值吗,对isEmpty 和 isBlank有多少了解呢
[2021] [paper notes] 6G technology vision - otfs modulation technology
1. Mx6ul core module serial use - touch screen calibration (IX)
Is the securities account presented by qiniu true? How to open it safely and reliably?
ERROR: could not extract tar starting at offset 000000000000020980+9231072+2
The third question of leetcode 302 weekly Games -- query the number with the smallest k after cutting the number
scipy.sparse.vstack
Prove that perfect numbers are even
LeetCode302场周赛第三题--裁剪数字后查询第 K 小的数字
C unit test
1. Mx6ul core module use serial -rs485 test (x)