⚡ 删除ObjectMapper的@Primary注解,便于用户定制自己的ObjectMapper
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user