springboot乱码问题解决方案
作者:jason小蜗牛 时间:2022-03-22 21:32:38
这篇文章主要介绍了springboot乱码问题解决方案,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
在配置文件中添加
#编码设置
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
server.tomcat.uri-encoding=UTF-8
使用springboot:run运行时控制台输出乱码问题,在pom文件中添加如下配置
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!--解决maven插件启动时中文乱码问题-->
<configuration>
<fork>true</fork>
<!-- spring-boot:run 中文乱码解决 -->
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
来源:https://www.cnblogs.com/jasonboren/p/12264157.html
标签:spring,boot,乱码
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
SpringCloud Eureka搭建的方法步骤
2021-10-10 11:03:29
![](https://img.aspxhome.com/file/2023/1/61241_0s.jpg)
Android使用VideoView播放本地视频和网络视频的方法
2023-06-28 11:17:32
![](https://img.aspxhome.com/file/2023/1/88111_0s.png)
Java中常用的设计模式之装饰器模式详解
2021-08-28 07:59:15
![](https://img.aspxhome.com/file/2023/0/88180_0s.png)
Android使用CrashHandler来获取应用的crash信息的方法
2023-07-25 20:27:38
Java代码优化细节
2023-06-26 09:34:34
MyBatis一对多嵌套查询的完整实例
2023-07-12 02:49:56
Opencv实现画笔功能
2023-04-03 11:10:24
![](https://img.aspxhome.com/file/2023/9/104919_0s.jpg)
Java开发完整短信验证码功能的全过程
2023-05-05 15:35:24
![](https://img.aspxhome.com/file/2023/7/92557_0s.png)
android异步消息机制 源码层面彻底解析(1)
2023-10-02 07:08:52
![](https://img.aspxhome.com/file/2023/8/85958_0s.jpg)
Android仿一点资讯收藏Toast动画效果
2022-01-15 18:42:33
![](https://img.aspxhome.com/file/2023/2/106832_0s.png)
在C#中调用VBScript、javascript等脚本的实现代码
2022-09-25 13:52:56
c# webapi 配置swagger的方法
2022-03-21 23:38:19
android自定义WaveView水波纹控件
2023-08-25 21:09:47
![](https://img.aspxhome.com/file/2023/8/120118_0s.gif)
简单学习Java抽象类要点及实例
2021-10-11 09:08:12
Quarkus中ConfigSourceInterceptor的加密配置实现
2021-10-08 10:47:14
SpringMVC按Ctrl上传多个文件的方法
2023-11-25 07:19:04
![](https://img.aspxhome.com/file/2023/2/116172_0s.jpg)
Java转JSON串的几种方式
2023-08-24 07:38:47
根据灰度值填充字符-单文件单线程版
2023-10-12 00:50:24
![](https://img.aspxhome.com/file/2023/0/106400_0s.jpg)
JAVA中对List进行查询
2023-12-17 20:41:20
Android蓝牙的开启和搜索设备功能开发实例
2022-11-07 20:42:17
![](https://img.aspxhome.com/file/2023/4/123284_0s.png)