目录
原因:
解决代码:
原因:最近遇到的问题,重新搭建java项目的时候没有发现这个问题,同事使用的时候发现的问题,现在记录一下解决的过程,
使用fastjson解决乱码
解决代码:@Configuration
public class FastJsonConfig {
@Bean
public HttpMessageConverters fastJsonHttpMessageConverters() {
//用字段名作为序列化和反序列化的key值
TypeUtils.compatibleWithFieldName = true;
//指定时区
TimeZone.setDefault(TimeZone.getTimeZone("GMT+8"));
//替换springboot的jso