|
@@ -0,0 +1,18 @@
|
|
|
+package com.hfln.portal.infrastructure.config;
|
|
|
+
|
|
|
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
|
|
+
|
|
|
+@Configuration
|
|
|
+public class JacksonConfig {
|
|
|
+
|
|
|
+ @Bean
|
|
|
+ public Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder() {
|
|
|
+ Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
|
|
|
+ builder.serializerByType(Long.class, ToStringSerializer.instance)
|
|
|
+ .serializerByType(Long.TYPE, ToStringSerializer.instance);
|
|
|
+ return builder;
|
|
|
+ }
|
|
|
+}
|