springboot乱码问题解决方案

  

这篇文章主要介绍了springboot乱码问题解决方案,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下

  

在配置文件中添加

        #编码设置   spring.http.encoding.charset=utf - 8   spring.http.encoding.enabled=true   spring.http.encoding.force=true   server.tomcat.uri-encoding utf - 8=      

使用springboot:运行运行时控制台输出乱码问题,在pom文件中添加如下配置

        & lt; build>   & lt; plugins>   & lt; plugin>   & lt; groupId> org.springframework.boot   & lt; artifactId> spring-boot-maven-plugin   & lt; !——解决maven插件启动时中文乱码问题——比;   & lt; configuration>   & lt; fork> true   & lt; !——spring-boot:运行中文乱码解决——比;   & lt; jvmArguments> -Dfile.encoding=UTF-8   & lt;/configuration>   & lt;/plugin>   & lt;/plugins>   & lt;/build>      

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

springboot乱码问题解决方案