springboot中的编码设置

在springboot中编码配置可以通过filter也可以通过springboot的核心配置文件application.properties中配置如下信息:

#配置字符编码
spring.http.encoding.charset=utf-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true

这样就可以解决乱码问题

猜你喜欢

转载自www.cnblogs.com/jasonboren/p/11140950.html