From d37cdf6252eca8336db4d786c41d4360879a6030 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Wed, 10 Jul 2024 07:53:43 +0200 Subject: [PATCH] Fikset kompileringsfeil --- .../backup/initKtor.kt | 36 +++++++++++-------- .../arbeidssoekerregisteret/app/Startup.kt | 19 +++++----- .../arbeidssoekerregisteret/app/TestScope.kt | 9 +++-- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/apps/hendelselogg-backup/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/backup/initKtor.kt b/apps/hendelselogg-backup/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/backup/initKtor.kt index 7670c669..1fe6f0db 100644 --- a/apps/hendelselogg-backup/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/backup/initKtor.kt +++ b/apps/hendelselogg-backup/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/backup/initKtor.kt @@ -4,18 +4,26 @@ import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.databind.SerializationFeature import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.registerKotlinModule -import io.ktor.http.* -import io.ktor.serialization.jackson.* -import io.ktor.server.application.* -import io.ktor.server.auth.* -import io.ktor.server.engine.* -import io.ktor.server.netty.* -import io.ktor.server.plugins.callloging.* -import io.ktor.server.plugins.contentnegotiation.* -import io.ktor.server.plugins.swagger.* -import io.ktor.server.request.* -import io.ktor.server.response.* -import io.ktor.server.routing.* +import io.ktor.http.HttpStatusCode +import io.ktor.serialization.jackson.jackson +import io.ktor.server.application.Application +import io.ktor.server.application.call +import io.ktor.server.application.install +import io.ktor.server.auth.authenticate +import io.ktor.server.auth.authentication +import io.ktor.server.auth.principal +import io.ktor.server.engine.embeddedServer +import io.ktor.server.netty.Netty +import io.ktor.server.plugins.callloging.CallLogging +import io.ktor.server.plugins.contentnegotiation.ContentNegotiation +import io.ktor.server.plugins.swagger.swaggerUI +import io.ktor.server.request.path +import io.ktor.server.request.receive +import io.ktor.server.response.respond +import io.ktor.server.routing.IgnoreTrailingSlash +import io.ktor.server.routing.Route +import io.ktor.server.routing.post +import io.ktor.server.routing.routing import io.micrometer.core.instrument.binder.MeterBinder import io.micrometer.prometheusmetrics.PrometheusMeterRegistry import no.nav.paw.arbeidssoekerregisteret.backup.api.brukerstoette.models.DetaljerRequest @@ -23,8 +31,8 @@ import no.nav.paw.arbeidssoekerregisteret.backup.api.brukerstoette.models.Feil import no.nav.paw.arbeidssoekerregisteret.backup.brukerstoette.BrukerstoetteService import no.nav.paw.arbeidssoekerregisteret.backup.health.configureHealthRoutes import no.nav.paw.arbeidssoekerregisteret.backup.health.installMetrics -import no.nav.paw.kafkakeygenerator.auth.NaisEnv -import no.nav.paw.kafkakeygenerator.auth.currentNaisEnv +import no.nav.paw.config.env.NaisEnv +import no.nav.paw.config.env.currentNaisEnv import no.nav.security.token.support.v2.IssuerConfig import no.nav.security.token.support.v2.TokenSupportConfig import no.nav.security.token.support.v2.TokenValidationContextPrincipal diff --git a/apps/utgang-formidlingsgruppe/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/app/Startup.kt b/apps/utgang-formidlingsgruppe/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/app/Startup.kt index 6eca053c..f18d4ded 100644 --- a/apps/utgang-formidlingsgruppe/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/app/Startup.kt +++ b/apps/utgang-formidlingsgruppe/src/main/kotlin/no/nav/paw/arbeidssoekerregisteret/app/Startup.kt @@ -7,27 +7,28 @@ import io.micrometer.prometheusmetrics.PrometheusMeterRegistry import kotlinx.coroutines.runBlocking import no.nav.paw.arbeidssokerregisteret.app.helse.Helse import no.nav.paw.arbeidssokerregisteret.app.helse.initKtor +import no.nav.paw.config.env.NaisEnv +import no.nav.paw.config.env.currentNaisEnv import no.nav.paw.config.hoplite.loadNaisOrLocalConfiguration +import no.nav.paw.config.kafka.KAFKA_STREAMS_CONFIG_WITH_SCHEME_REG import no.nav.paw.config.kafka.KafkaConfig import no.nav.paw.config.kafka.streams.KafkaStreamsFactory -import org.apache.kafka.common.serialization.Serdes -import org.apache.kafka.streams.StreamsBuilder -import org.apache.kafka.streams.state.Stores -import org.slf4j.LoggerFactory -import no.nav.paw.config.kafka.KAFKA_STREAMS_CONFIG_WITH_SCHEME_REG -import no.nav.paw.kafkakeygenerator.auth.NaisEnv -import no.nav.paw.kafkakeygenerator.auth.currentNaisEnv import no.nav.paw.kafkakeygenerator.client.KafkaKeysResponse import no.nav.paw.kafkakeygenerator.client.createKafkaKeyGeneratorClient +import org.apache.kafka.common.serialization.Serdes import org.apache.kafka.streams.KafkaStreams +import org.apache.kafka.streams.StreamsBuilder import org.apache.kafka.streams.StreamsConfig import org.apache.kafka.streams.errors.StreamsUncaughtExceptionHandler +import org.apache.kafka.streams.state.Stores +import org.slf4j.LoggerFactory const val partitionCount: Int = 6 const val periodeTopic = "paw.arbeidssokerperioder-v1" -val applicationConfiguration: ApplicationConfiguration get() = - loadNaisOrLocalConfiguration("application_configuration.toml") +val applicationConfiguration: ApplicationConfiguration + get() = + loadNaisOrLocalConfiguration("application_configuration.toml") typealias kafkaKeyFunction = (String) -> KafkaKeysResponse? diff --git a/apps/utgang-formidlingsgruppe/src/test/kotlin/no/nav/paw/arbeidssoekerregisteret/app/TestScope.kt b/apps/utgang-formidlingsgruppe/src/test/kotlin/no/nav/paw/arbeidssoekerregisteret/app/TestScope.kt index f57c596f..a0291523 100644 --- a/apps/utgang-formidlingsgruppe/src/test/kotlin/no/nav/paw/arbeidssoekerregisteret/app/TestScope.kt +++ b/apps/utgang-formidlingsgruppe/src/test/kotlin/no/nav/paw/arbeidssoekerregisteret/app/TestScope.kt @@ -11,14 +11,17 @@ import no.nav.paw.arbeidssoekerregisteret.app.vo.ArenaFormidlingsruppe import no.nav.paw.arbeidssoekerregisteret.app.vo.AvsluttetSerde import no.nav.paw.arbeidssokerregisteret.api.v1.Periode import no.nav.paw.arbeidssokerregisteret.intern.v1.Avsluttet -import no.nav.paw.kafkakeygenerator.auth.NaisEnv -import no.nav.paw.kafkakeygenerator.client.KafkaKeysResponse +import no.nav.paw.config.env.NaisEnv import no.nav.paw.kafkakeygenerator.client.inMemoryKafkaKeysMock import org.apache.avro.specific.SpecificRecord import org.apache.kafka.common.serialization.Serde import org.apache.kafka.common.serialization.Serdes import org.apache.kafka.common.utils.Time -import org.apache.kafka.streams.* +import org.apache.kafka.streams.StreamsBuilder +import org.apache.kafka.streams.StreamsConfig +import org.apache.kafka.streams.TestInputTopic +import org.apache.kafka.streams.TestOutputTopic +import org.apache.kafka.streams.TopologyTestDriver import org.apache.kafka.streams.state.KeyValueStore import org.apache.kafka.streams.state.internals.InMemoryKeyValueBytesStoreSupplier import org.apache.kafka.streams.state.internals.KeyValueStoreBuilder