moved objectmapper

This commit is contained in:
snoop 2017-09-27 14:25:35 +09:00
parent f8769028aa
commit d9a352e32f
2 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,7 @@
package com.loafle.overflow.spring;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.*;
import org.springframework.core.io.ClassPathResource;
@ -25,4 +27,14 @@ public class AppConfig {
return ppc;
}
@Bean
public ObjectMapper getObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return objectMapper;
}
}

View File

@ -70,10 +70,7 @@ public class JdbcConfiguration implements TransactionManagementConfigurer {
return entityManagerFactoryBean;
}
@Bean
public ObjectMapper getObjectMapper() {
return new ObjectMapper();
}
@Bean
@Qualifier(value = "transactionManager")