Skip to content

Commit

Permalink
remove kafka from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xcodeassociated committed May 31, 2024
1 parent c115815 commit 17fd89f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/kotlin/com/softeno/template/SoftenoMvcJpaApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ class WebClientConfig {

}

@Profile(value = ["!integration"])
@Configuration
@EnableKafka
class KafkaConfig {
Expand Down Expand Up @@ -546,6 +547,7 @@ class KafkaConfig {
fun kafkaTemplate(producerFactory: ProducerFactory<String, KafkaMessage>) = KafkaTemplate(producerFactory)
}

@Profile(value = ["!integration"])
@Controller
class KafkaListenerController {
private val log = LogFactory.getLog(javaClass)
Expand All @@ -561,6 +563,7 @@ class KafkaListenerController {
@JsonIgnoreProperties(ignoreUnknown = true)
data class KafkaMessage(val content: String)

@Profile(value = ["!integration"])
@Service
class KafkaService(
private val kafkaTemplate: KafkaTemplate<String, KafkaMessage>,
Expand All @@ -576,6 +579,7 @@ class KafkaService(

data class AppEvent(val source: String) : ApplicationEvent(source)

@Profile(value = ["!integration"])
@Component
class SampleApplicationEventPublisher(private val kafkaService: KafkaService) : ApplicationListener<AppEvent> {
private val log = LogFactory.getLog(javaClass)
Expand Down

0 comments on commit 17fd89f

Please sign in to comment.