|
@@ -17,7 +17,7 @@ import java.text.SimpleDateFormat
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
@Configuration
|
|
@Configuration
|
|
-class EnvirWebMvcConfiguration : WebMvcConfigurer {
|
|
|
|
|
|
+open class EnvirWebMvcConfiguration : WebMvcConfigurer {
|
|
|
|
|
|
companion object {
|
|
companion object {
|
|
const val CONVERTER_NAME = "hookMappingJackson2HttpMessageConverter"
|
|
const val CONVERTER_NAME = "hookMappingJackson2HttpMessageConverter"
|
|
@@ -37,7 +37,7 @@ class EnvirWebMvcConfiguration : WebMvcConfigurer {
|
|
}
|
|
}
|
|
|
|
|
|
@Bean(CONVERTER_NAME)
|
|
@Bean(CONVERTER_NAME)
|
|
- fun getConverter(): MappingJackson2HttpMessageConverter {
|
|
|
|
|
|
+ open fun getConverter(): MappingJackson2HttpMessageConverter {
|
|
return MappingJackson2HttpMessageConverter().apply {
|
|
return MappingJackson2HttpMessageConverter().apply {
|
|
this.objectMapper = builder().build()
|
|
this.objectMapper = builder().build()
|
|
}
|
|
}
|
|
@@ -45,7 +45,7 @@ class EnvirWebMvcConfiguration : WebMvcConfigurer {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@Primary
|
|
@Primary
|
|
- fun builder(): Jackson2ObjectMapperBuilder {
|
|
|
|
|
|
+ open fun builder(): Jackson2ObjectMapperBuilder {
|
|
return Jackson2ObjectMapperBuilder().apply {
|
|
return Jackson2ObjectMapperBuilder().apply {
|
|
serializerByType(java.lang.Long::class.java, ToStringSerializer.instance)
|
|
serializerByType(java.lang.Long::class.java, ToStringSerializer.instance)
|
|
serializerByType(java.lang.Long.TYPE, ToStringSerializer.instance)
|
|
serializerByType(java.lang.Long.TYPE, ToStringSerializer.instance)
|