From 25ffa09731e3e28c35ed5c37625ed90bef76b5eb Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 11 Mar 2024 20:36:31 +0000 Subject: [PATCH] Start building against Spring Kafka 3.2.0 snapshots See gh-39897 --- .../ConcurrentKafkaListenerContainerFactoryConfigurer.java | 4 ++-- .../boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java | 4 ++-- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java index 86cfd258ee9..d4c4ebf55d3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2024 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. @@ -237,7 +237,7 @@ public class ConcurrentKafkaListenerContainerFactoryConfigurer { map.from(properties::isMissingTopicsFatal).to(container::setMissingTopicsFatal); map.from(properties::isImmediateStop).to(container::setStopImmediate); map.from(properties::isObservationEnabled).to(container::setObservationEnabled); - map.from(this.transactionManager).to(container::setTransactionManager); + map.from(this.transactionManager).to(container::setKafkaAwareTransactionManager); map.from(this.rebalanceListener).to(container::setConsumerRebalanceListener); map.from(this.listenerTaskExecutor).to(container::setListenerTaskExecutor); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java index 56b627bd835..0c3d0cced72 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java @@ -743,7 +743,7 @@ class KafkaAutoConfigurationTests { assertThat(context).hasSingleBean(KafkaAwareTransactionManager.class); ConcurrentKafkaListenerContainerFactory factory = context .getBean(ConcurrentKafkaListenerContainerFactory.class); - assertThat(factory.getContainerProperties().getTransactionManager()) + assertThat(factory.getContainerProperties().getKafkaAwareTransactionManager()) .isSameAs(context.getBean(KafkaAwareTransactionManager.class)); }); } @@ -758,7 +758,7 @@ class KafkaAutoConfigurationTests { .run((context) -> { ConcurrentKafkaListenerContainerFactory factory = context .getBean(ConcurrentKafkaListenerContainerFactory.class); - assertThat(factory.getContainerProperties().getTransactionManager()) + assertThat(factory.getContainerProperties().getKafkaAwareTransactionManager()) .isSameAs(context.getBean("customTransactionManager")); }); } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 76804f9a775..2bd46f2df0b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1891,7 +1891,7 @@ bom { releaseNotes("https://github.com/spring-projects/spring-integration/releases/tag/v{version}") } } - library("Spring Kafka", "3.2.0-M1") { + library("Spring Kafka", "3.2.0-SNAPSHOT") { considerSnapshots() group("org.springframework.kafka") { modules = [