美文网首页
spring boot 中文乱码问题解决

spring boot 中文乱码问题解决

作者: liurongming | 来源:发表于2017-08-13 22:23 被阅读0次

采用yml的方式配置,传统的方法,配置一样只是格式不同而已

# 配置信息
spring:
  redis:
    hostName: 192.168.0.18
    port: 6379    
    password:
    timeout: 0
    pool:
      maxActive: 8    
      maxWait: -1    
      maxIdle: 8    
      minIdle: 0 
  http: 
    encoding:
      force: true
      charset: UTF-8
      enabled: true

server:    
  tomcat:
    uri-encoding: UTF-8

主要加上:

spring:
  http: 
    encoding:
      force: true
      charset: UTF-8
      enabled: true
server:    
  tomcat:
    uri-encoding: UTF-8

相关文章

网友评论

      本文标题:spring boot 中文乱码问题解决

      本文链接:https://www.haomeiwen.com/subject/scfyrxtx.html