Skip to content

Commit 8ea4aa5

Browse files
committed
Remove sslBundle parameter for KafkaProperties.
It was removed from spring-projects/spring-boot#45727 It was not being used by the properties.
1 parent a140efa commit 8ea4aa5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

spring-cloud-starter-single-step-batch-job/src/main/java/org/springframework/cloud/task/batch/autoconfigure/kafka/KafkaItemReaderAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
3232
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
3333
import org.springframework.boot.context.properties.EnableConfigurationProperties;
34-
import org.springframework.boot.ssl.SslBundles;
3534
import org.springframework.context.annotation.Bean;
3635
import org.springframework.util.StringUtils;
3736

@@ -55,9 +54,9 @@ public class KafkaItemReaderAutoConfiguration {
5554
@ConditionalOnMissingBean
5655
@ConditionalOnProperty(prefix = "spring.batch.job.kafkaitemreader", name = "name")
5756
public KafkaItemReader<Object, Map<String, Object>> kafkaItemReader(
58-
KafkaItemReaderProperties kafkaItemReaderProperties, SslBundles sslBundles) {
57+
KafkaItemReaderProperties kafkaItemReaderProperties) {
5958
Properties consumerProperties = new Properties();
60-
consumerProperties.putAll(this.kafkaProperties.getConsumer().buildProperties(sslBundles));
59+
consumerProperties.putAll(this.kafkaProperties.getConsumer().buildProperties());
6160
validateProperties(kafkaItemReaderProperties);
6261
if (kafkaItemReaderProperties.getPartitions() == null
6362
|| kafkaItemReaderProperties.getPartitions().size() == 0) {

spring-cloud-starter-single-step-batch-job/src/main/java/org/springframework/cloud/task/batch/autoconfigure/kafka/KafkaItemWriterAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
3131
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
3232
import org.springframework.boot.context.properties.EnableConfigurationProperties;
33-
import org.springframework.boot.ssl.SslBundles;
3433
import org.springframework.context.annotation.Bean;
3534
import org.springframework.core.convert.converter.Converter;
3635
import org.springframework.kafka.core.DefaultKafkaProducerFactory;
@@ -85,9 +84,9 @@ public Object convert(Map<String, Object> source) {
8584

8685
@Bean
8786
@ConditionalOnMissingBean
88-
ProducerFactory<Object, Map<String, Object>> producerFactory(SslBundles sslBundles) {
87+
ProducerFactory<Object, Map<String, Object>> producerFactory() {
8988
Map<String, Object> configs = new HashMap<>();
90-
configs.putAll(this.kafkaProperties.getProducer().buildProperties(sslBundles));
89+
configs.putAll(this.kafkaProperties.getProducer().buildProperties());
9190
return new DefaultKafkaProducerFactory<>(configs, null, new JsonSerializer<>());
9291
}
9392

0 commit comments

Comments
 (0)