|
|
|
|
@ -25,6 +25,9 @@ import org.apache.kafka.clients.consumer.ConsumerConfig;
@@ -25,6 +25,9 @@ import org.apache.kafka.clients.consumer.ConsumerConfig;
|
|
|
|
|
import org.apache.kafka.clients.producer.ProducerConfig; |
|
|
|
|
import org.apache.kafka.common.config.SslConfigs; |
|
|
|
|
|
|
|
|
|
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; |
|
|
|
|
@ -42,6 +45,7 @@ import org.springframework.boot.ssl.SslBundle;
@@ -42,6 +45,7 @@ import org.springframework.boot.ssl.SslBundle;
|
|
|
|
|
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; |
|
|
|
|
@ -78,6 +82,7 @@ import org.springframework.util.StringUtils;
@@ -78,6 +82,7 @@ import org.springframework.util.StringUtils;
|
|
|
|
|
@ConditionalOnClass(KafkaTemplate.class) |
|
|
|
|
@EnableConfigurationProperties(KafkaProperties.class) |
|
|
|
|
@Import({ KafkaAnnotationDrivenConfiguration.class, KafkaStreamsAnnotationDrivenConfiguration.class }) |
|
|
|
|
@ImportRuntimeHints(KafkaAutoConfiguration.KafkaRuntimeHints.class) |
|
|
|
|
public class KafkaAutoConfiguration { |
|
|
|
|
|
|
|
|
|
private final KafkaProperties properties; |
|
|
|
|
@ -249,4 +254,13 @@ public class KafkaAutoConfiguration {
@@ -249,4 +254,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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|