Skip to content

Commit 4799d2a

Browse files
committed
Polish "Add transactionIdPrefix Property to KafkaTemplate"
See gh-29089
1 parent 33814a4 commit 4799d2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -67,7 +67,6 @@ public KafkaAutoConfiguration(KafkaProperties properties) {
6767
public KafkaTemplate<?, ?> kafkaTemplate(ProducerFactory<Object, Object> kafkaProducerFactory,
6868
ProducerListener<Object, Object> kafkaProducerListener,
6969
ObjectProvider<RecordMessageConverter> messageConverter) {
70-
7170
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
7271
KafkaTemplate<Object, Object> kafkaTemplate = new KafkaTemplate<>(kafkaProducerFactory);
7372
messageConverter.ifUnique(kafkaTemplate::setMessageConverter);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,8 @@ public static class Template {
825825
private String defaultTopic;
826826

827827
/**
828-
* Override the transaction id prefix in the producer factory.
828+
* Transaction id prefix, override the transaction id prefix in the producer
829+
* factory.
829830
*/
830831
private String transactionIdPrefix;
831832

0 commit comments

Comments
 (0)