删除ObjectMapper的@Primary注解,便于用户定制自己的ObjectMapper

This commit is contained in:
b2baccline
2020-07-29 21:36:45 +08:00
parent 15a2e9dad5
commit 2bd971cec7

View File

@@ -8,7 +8,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
/** /**
* @author Hccake * @author Hccake
@@ -24,7 +23,6 @@ public class JacksonConfig {
* @return ObjectMapper * @return ObjectMapper
*/ */
@Bean @Bean
@Primary
@ConditionalOnMissingBean(ObjectMapper.class) @ConditionalOnMissingBean(ObjectMapper.class)
public ObjectMapper objectMapper() { public ObjectMapper objectMapper() {
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();