From ed9816f9192f4d8aab12dd3d47ee461cc48d1aae Mon Sep 17 00:00:00 2001 From: Tor-Christian Tangenes Date: Fri, 13 Oct 2023 13:43:23 +0200 Subject: [PATCH] Bean issue --- .../syfo/kafka/consumer/AktivitetskravVurderingListener.kt | 5 +++-- .../no/nav/syfo/service/AktivitetskravVurderingService.kt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/no/nav/syfo/kafka/consumer/AktivitetskravVurderingListener.kt b/src/main/kotlin/no/nav/syfo/kafka/consumer/AktivitetskravVurderingListener.kt index 7193f5d..b0c749a 100644 --- a/src/main/kotlin/no/nav/syfo/kafka/consumer/AktivitetskravVurderingListener.kt +++ b/src/main/kotlin/no/nav/syfo/kafka/consumer/AktivitetskravVurderingListener.kt @@ -4,6 +4,7 @@ import no.nav.syfo.kafka.config.aktivitetskravVurderingTopic import no.nav.syfo.logger import no.nav.syfo.service.AktivitetskravVurderingService import org.apache.kafka.clients.consumer.ConsumerRecord +import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.info.JavaInfo.JavaRuntimeEnvironmentInfo import org.springframework.kafka.annotation.KafkaListener import org.springframework.kafka.support.Acknowledgment @@ -11,8 +12,8 @@ import org.springframework.stereotype.Component import kotlin.system.exitProcess @Component -class AktivitetskravVurderingListener( - val aktivitetskravVurderingService: AktivitetskravVurderingService +class AktivitetskravVurderingListener @Autowired constructor( + private val aktivitetskravVurderingService: AktivitetskravVurderingService ) { private val log = logger() diff --git a/src/main/kotlin/no/nav/syfo/service/AktivitetskravVurderingService.kt b/src/main/kotlin/no/nav/syfo/service/AktivitetskravVurderingService.kt index 64dcd48..3bde26d 100644 --- a/src/main/kotlin/no/nav/syfo/service/AktivitetskravVurderingService.kt +++ b/src/main/kotlin/no/nav/syfo/service/AktivitetskravVurderingService.kt @@ -1,7 +1,9 @@ package no.nav.syfo.service import no.nav.syfo.logger +import org.springframework.stereotype.Service +@Service class AktivitetskravVurderingService { private val log = logger()