[JAVA-15471] Changed custom properties with spring properties (#13003)

Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
This commit is contained in:
panos-kakos 2022-11-16 20:00:33 +00:00 committed by GitHub
parent b8b8ed889b
commit 2beab43784
5 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@ import java.util.stream.Collectors;
@Component
public class KafkaCountingMessagesComponent {
@Value(value = "${kafka.bootstrapAddress}")
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
public static Map<String, Object> props = new HashMap<>();

View File

@ -22,7 +22,7 @@ import org.springframework.kafka.support.serializer.JsonDeserializer;
@Configuration
public class KafkaConsumerConfig {
@Value(value = "${kafka.bootstrapAddress}")
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
public ConsumerFactory<String, String> consumerFactory(String groupId) {

View File

@ -16,7 +16,7 @@ import org.springframework.kafka.support.serializer.JsonSerializer;
@Configuration
public class KafkaProducerConfig {
@Value(value = "${kafka.bootstrapAddress}")
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
@Bean

View File

@ -13,7 +13,7 @@ import org.springframework.kafka.core.KafkaAdmin;
@Configuration
public class KafkaTopicConfig {
@Value(value = "${kafka.bootstrapAddress}")
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
@Value(value = "${message.topic.name}")

View File

@ -1,4 +1,4 @@
kafka.bootstrapAddress=localhost:9092
spring.kafka.bootstrap-servers=localhost:9092
message.topic.name=baeldung
long.message.topic.name=longMessage
greeting.topic.name=greeting