当前位置:网站首页>Completely solve the problem of Chinese garbled code in Web Engineering at one time
Completely solve the problem of Chinese garbled code in Web Engineering at one time
2022-06-27 13:36:00 【Spring-_- Bear】
List of articles
One 、IDEA The console is garbled
IDEA Set the file code as UTF-8

modify IDEA The installation directory bin Under the
idea.exe.vmoptionsandidea64.exe.vmoptions, Add at the end of the line-Dfile.encoding=UTF-8
IDEA Set the console print to use UTF-8 code

Two 、 Request data garbled
IDEA Revision in China Tomcat Use
-Dfile.encoding=UTF-8
modify Tomcat The installation directory conf Under the
server.xml, stay<Connector/>Add... To the tagURIEndcong="UTF-8"solve GET Ask for random code
modify Tomcat The installation directory bin Next
catalina.bat, Add... In the following location-Dfile.encoding=UTF-8(-Dfile There can only be one space before )
HTML Page in JavaScript Use when file UTF-8 code
<script type="text/javascript" charset="UTF-8" th:src="@{/static/js/login.js}"></script>Clear browser cache , restart Tomcat
3、 ... and 、 Deploy Linux The statement
pom.xmlSet in Maven Use when packaging items UTF-8 code , Avoid generating bytecode files that are not UTF-8 After the code is deployed to the remote server, it is garbled again<properties> <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> <spring.version>5.3.1</spring.version> <!-- Maven The packaging code is specified as UTF-8, Avoid random code after the project is deployed to the remote server --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- Maven Skip testing when packaging --> <maven.test.skip>true</maven.test.skip> </properties>
边栏推荐
- 每日刷題記錄 (六)
- Record number of visits yesterday
- 动态规划
- [tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (III)
- Firewall foundation Huawei H3C firewall web page login
- Quickly set up a website to visit foreign countries, set up SS and start BBR to quickly surf the Internet
- 万物互联时代到来,锐捷发布场景化无线零漫游方案
- 7 killer JS lines of code
- zabbix支持钉钉报警
- 【TcaplusDB知识库】TcaplusDB-tcapulogmgr工具介绍(一)
猜你喜欢
![[dynamic programming] - Knapsack Problem](/img/27/c48284f15e3f80305d7ce7c02d4378.png)
[dynamic programming] - Knapsack Problem

What kind of air conditioner is this?

快讯:华为启动鸿蒙开发者大赛;腾讯会议发布“万室如意”计划

Bluetooth health management device based on stm32

Firewall foundation Huawei H3C firewall web page login
![[medical segmentation] unet3+](/img/93/1e9728a3dbebbf3bd9ce015552ce7a.jpg)
[medical segmentation] unet3+

A pang's operation record

How to choose LAN instant messaging software

创建Deployment后,无法创建Pod问题处理

ENSP cloud configuration
随机推荐
Crane: a new way of dealing with dictionary items and associated data
Record number of visits yesterday
awk 简明教程
[weekly replay] the 81st biweekly match of leetcode
Local visualization tool connects to redis of Alibaba cloud CentOS server
How to split microservices
MySQL index and its classification
爱可可AI前沿推介(6.27)
Two TCP flow control problems
Differences in perspectives of thinking
JVM parameter setting and analysis
Intranet learning notes (8)
Tiktok practice ~ public / private short video interchange
Using FRP tool to realize intranet penetration
微服务如何拆分
Today's sleep quality record 78 points
Clear self orientation
Bluetooth health management device based on stm32
Vs debugging skills
Airbnb double disk microservice