feat: add conditional missing bean
This commit is contained in:
@@ -181,6 +181,7 @@ public class ContextFunctionCatalogAutoConfiguration {
|
|||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
public static class JsonMapperConfiguration {
|
public static class JsonMapperConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(JsonMapper.class)
|
||||||
public JsonMapper jsonMapper(ApplicationContext context) {
|
public JsonMapper jsonMapper(ApplicationContext context) {
|
||||||
String preferredMapper = context.getEnvironment().getProperty(JSON_MAPPER_PROPERTY);
|
String preferredMapper = context.getEnvironment().getProperty(JSON_MAPPER_PROPERTY);
|
||||||
if (StringUtils.hasText(preferredMapper)) {
|
if (StringUtils.hasText(preferredMapper)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user