From 8ecb85e5fd228cef4d1ad022bd88cadd3b628690 Mon Sep 17 00:00:00 2001 From: JeonDaehong <90895144+JeonDaehong@users.noreply.github.com> Date: Wed, 9 Oct 2024 02:52:18 +0900 Subject: [PATCH] GH-3514: `RetryableTopic` javadoc/test update for defaultRetryTopicKafkaTemplate Fixes: #3514 https://github.com/spring-projects/spring-kafka/issues/3514 * Fix: Replace `retryTopicDefaultKafkaTemplate` with `defaultRetryTopicKafkaTemplate` in javadocs * Fix: Replace `retryTopicDefaultKafkaTemplate` with `RetryTopicBeanNames.DEFAULT_KAFKA_TEMPLATE_BEAN_NAME` in Test Code (cherry picked from commit f1cb003e832e3561ac219912d577b1285b747a82) --- .../org/springframework/kafka/annotation/RetryableTopic.java | 2 +- .../retrytopic/RetryTopicConfigurationProviderTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryableTopic.java b/spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryableTopic.java index b90c611acb..af9a6a6051 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryableTopic.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryableTopic.java @@ -81,7 +81,7 @@ * * The bean name of the {@link org.springframework.kafka.core.KafkaTemplate} bean that * will be used to forward the message to the retry and Dlt topics. If not specified, - * a bean with name {@code retryTopicDefaultKafkaTemplate} or {@code kafkaTemplate} + * a bean with name {@code defaultRetryTopicKafkaTemplate} or {@code kafkaTemplate} * will be looked up. * * @return the kafkaTemplate bean name. diff --git a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationProviderTests.java b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationProviderTests.java index d30e3859e2..bf621042c4 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationProviderTests.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/retrytopic/RetryTopicConfigurationProviderTests.java @@ -89,7 +89,7 @@ private Method getAnnotatedMethod(String methodName) { void shouldProvideFromAnnotation() { // setup - willReturn(kafkaOperations).given(beanFactory).getBean("retryTopicDefaultKafkaTemplate", KafkaOperations.class); + willReturn(kafkaOperations).given(beanFactory).getBean(RetryTopicBeanNames.DEFAULT_KAFKA_TEMPLATE_BEAN_NAME, KafkaOperations.class); // given RetryTopicConfigurationProvider provider = new RetryTopicConfigurationProvider(beanFactory); @@ -149,7 +149,7 @@ void shouldFindNone() { void shouldProvideFromMetaAnnotation() { // setup - willReturn(kafkaOperations).given(beanFactory).getBean("retryTopicDefaultKafkaTemplate", KafkaOperations.class); + willReturn(kafkaOperations).given(beanFactory).getBean(RetryTopicBeanNames.DEFAULT_KAFKA_TEMPLATE_BEAN_NAME, KafkaOperations.class); // given RetryTopicConfigurationProvider provider = new RetryTopicConfigurationProvider(beanFactory);