feat: add conditional missing bean

This commit is contained in:
kihwankim
2024-09-08 19:20:00 +09:00
parent 1cf1a90ce2
commit d074fb324c

View File

@@ -181,6 +181,7 @@ public class ContextFunctionCatalogAutoConfiguration {
@Configuration(proxyBeanMethods = false)
public static class JsonMapperConfiguration {
@Bean
@ConditionalOnMissingBean(JsonMapper.class)
public JsonMapper jsonMapper(ApplicationContext context) {
String preferredMapper = context.getEnvironment().getProperty(JSON_MAPPER_PROPERTY);
if (StringUtils.hasText(preferredMapper)) {