[JAVA-15471] Changed custom properties with spring properties (#13003)
Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
This commit is contained in:
parent
b8b8ed889b
commit
2beab43784
|
@ -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<>();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue