|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2012-2023 the original author or authors. |
|
|
|
|
* Copyright 2012-2025 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -24,6 +24,9 @@ import org.apache.kafka.clients.CommonClientConfigs;
@@ -24,6 +24,9 @@ import org.apache.kafka.clients.CommonClientConfigs;
|
|
|
|
|
import org.apache.kafka.clients.consumer.ConsumerConfig; |
|
|
|
|
import org.apache.kafka.clients.producer.ProducerConfig; |
|
|
|
|
|
|
|
|
|
import org.springframework.aot.hint.MemberCategory; |
|
|
|
|
import org.springframework.aot.hint.RuntimeHints; |
|
|
|
|
import org.springframework.aot.hint.RuntimeHintsRegistrar; |
|
|
|
|
import org.springframework.beans.factory.ObjectProvider; |
|
|
|
|
import org.springframework.boot.autoconfigure.AutoConfiguration; |
|
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
|
@ -38,6 +41,7 @@ import org.springframework.boot.context.properties.PropertyMapper;
@@ -38,6 +41,7 @@ import org.springframework.boot.context.properties.PropertyMapper;
|
|
|
|
|
import org.springframework.boot.ssl.SslBundles; |
|
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
|
import org.springframework.context.annotation.Import; |
|
|
|
|
import org.springframework.context.annotation.ImportRuntimeHints; |
|
|
|
|
import org.springframework.kafka.core.ConsumerFactory; |
|
|
|
|
import org.springframework.kafka.core.DefaultKafkaConsumerFactory; |
|
|
|
|
import org.springframework.kafka.core.DefaultKafkaProducerFactory; |
|
|
|
|
@ -73,6 +77,7 @@ import org.springframework.retry.backoff.SleepingBackOffPolicy;
@@ -73,6 +77,7 @@ import org.springframework.retry.backoff.SleepingBackOffPolicy;
|
|
|
|
|
@ConditionalOnClass(KafkaTemplate.class) |
|
|
|
|
@EnableConfigurationProperties(KafkaProperties.class) |
|
|
|
|
@Import({ KafkaAnnotationDrivenConfiguration.class, KafkaStreamsAnnotationDrivenConfiguration.class }) |
|
|
|
|
@ImportRuntimeHints(KafkaAutoConfiguration.KafkaRuntimeHints.class) |
|
|
|
|
public class KafkaAutoConfiguration { |
|
|
|
|
|
|
|
|
|
private final KafkaProperties properties; |
|
|
|
|
@ -230,4 +235,13 @@ public class KafkaAutoConfiguration {
@@ -230,4 +235,13 @@ public class KafkaAutoConfiguration {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static class KafkaRuntimeHints implements RuntimeHintsRegistrar { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void registerHints(RuntimeHints hints, ClassLoader classLoader) { |
|
|
|
|
hints.reflection().registerType(SslBundleSslEngineFactory.class, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|