EmbeddedKafka + JUnit

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 4

  • @fvhiveproductionsbyLadyAga
    @fvhiveproductionsbyLadyAga  3 месяца назад

    pom.xml

    junit
    junit
    4.13.2

    org.springframework.boot
    spring-boot-starter-web

    org.springframework.kafka
    spring-kafka

    org.springframework.kafka
    spring-kafka-test
    org.springframework.boot
    spring-boot-starter-test
    test

    org.projectlombok
    lombok
    test


    org.springframework.boot
    spring-boot-maven-plugin

  • @fvhiveproductionsbyLadyAga
    @fvhiveproductionsbyLadyAga  3 месяца назад

    application-test.properties
    spring.kafka.consumer.bootstrap-servers = localhost:9092
    spring.kafka.consumer.group-id= group_id
    spring.kafka.consumer.auto-offset-reset = earliest
    spring.kafka.consumer.key-deserializer= org.apache.kafka.common.serialization.StringDeserializer
    spring.kafka.consumer.value-deserializer = org.apache.kafka.common.serialization.StringDeserializer
    spring.kafka.producer.bootstrap-servers = localhost:9092
    spring.kafka.producer.key-serializer = org.apache.kafka.common.serialization.StringSerializer
    spring.kafka.producer.value-serializer = org.apache.kafka.common.serialization.StringSerializer