当前位置:网站首页>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>
边栏推荐
- MySQL 索引及其分类
- Summary of redis master-slave replication principle
- What is low code for digital Nova? What is no code
- Nifi from introduction to practice (nanny level tutorial) - identity authentication
- #yyds干货盘点# 解决剑指offer:剪绳子(进阶版)
- Explore tidb lightning source code to solve the found bugs
- Openhgnn releases version 0.3
- [XMAN2018排位赛]通行证
- Viewpager2 usage record
- PLM还能怎么用?
猜你喜欢

How to set postman to Chinese? (Chinese)
![[medical segmentation] unet3+](/img/93/1e9728a3dbebbf3bd9ce015552ce7a.jpg)
[medical segmentation] unet3+

关于接口测试自动化的总结与思考

Journal quotidien des questions (6)

Crane: a new way of dealing with dictionary items and associated data

ThreadLocal 源码全详解(ThreadLocalMap)

Pre training weekly issue 51: reconstruction pre training, zero sample automatic fine tuning, one click call opt

crane:字典项与关联数据处理的新思路

Cloud native (30) | kubernetes' app store Helm

【周赛复盘】LeetCode第81场双周赛
随机推荐
JSON. Stringify usage
Journal quotidien des questions (6)
[weekly replay] the 81st biweekly match of leetcode
基于SSM实现招聘网站
To understand again is the person in the song
爱可可AI前沿推介(6.27)
Kotlin函数使用示例教程
快讯:华为启动鸿蒙开发者大赛;腾讯会议发布“万室如意”计划
Two TCP flow control problems
jvm 参数设置与分析
Interviewer: do you understand redis' shared object pool?
Different habits
新华三的千亿企业梦,还得靠吃ICT老本来实现?
关于接口测试自动化的总结与思考
思考的角度的差异
Implementation of recruitment website based on SSM
Teach you how to build a permanent personal server!
手把手教你搭一个永久运行的个人服务器!
Tiktok practice ~ public / private short video interchange
OpenHGNN发布0.3版本