|
@@ -1,6 +1,8 @@
|
|
package com.leromro.framework.config;
|
|
package com.leromro.framework.config;
|
|
|
|
|
|
import java.util.TimeZone;
|
|
import java.util.TimeZone;
|
|
|
|
+
|
|
|
|
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Bean;
|
|
@@ -25,6 +27,8 @@ public class ApplicationConfig
|
|
@Bean
|
|
@Bean
|
|
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
|
|
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization()
|
|
{
|
|
{
|
|
- return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault());
|
|
|
|
|
|
+ return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault())
|
|
|
|
+ .serializerByType(Long.class, new ToStringSerializer())
|
|
|
|
+ .serializerByType(Long.TYPE, new ToStringSerializer());
|
|
}
|
|
}
|
|
}
|
|
}
|