Ssl bundle needs to be passed in as a parameter

it was autowired
This commit is contained in:
Glenn Renfro
2023-10-19 12:08:55 -04:00
parent f8d3c66c1a
commit 15d78eb43a

View File

@@ -51,14 +51,11 @@ public class KafkaItemReaderAutoConfiguration {
@Autowired
private KafkaProperties kafkaProperties;
@Autowired
private SslBundles sslBundles;
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.batch.job.kafkaitemreader", name = "name")
public KafkaItemReader<Object, Map<String, Object>> kafkaItemReader(
KafkaItemReaderProperties kafkaItemReaderProperties) {
KafkaItemReaderProperties kafkaItemReaderProperties, SslBundles sslBundles) {
Properties consumerProperties = new Properties();
consumerProperties.putAll(this.kafkaProperties.getConsumer().buildProperties(sslBundles));
validateProperties(kafkaItemReaderProperties);