From db4cde87f24570ee35dcd71d5eee467128c6546e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20N=2E=20Wed=C3=B8e?= Date: Tue, 3 Sep 2024 11:10:10 +0200 Subject: [PATCH 1/3] Get oppgavebeskrivelse when relevant. --- build.gradle.kts | 3 + .../oppgave/api/mapper/BehandlingMapper.kt | 17 ++- .../api/view/BehandlingDetaljerView.kt | 1 + ...fsetDateTimeToLocalDateTimeDeserializer.kt | 15 ++ .../clients/oppgaveapi/OppgaveApiClient.kt | 69 ++++++++++ .../clients/oppgaveapi/OppgaveApiRecord.kt | 128 ++++++++++++++++++ .../config/OppgaveApiClientConfiguration.kt | 27 ++++ .../oppgave/service/OppgaveApiService.kt | 24 ++++ .../no/nav/klage/oppgave/util/TokenUtil.kt | 6 + src/main/resources/application-dev-gcp.yml | 3 + src/main/resources/application-prod-gcp.yml | 3 + src/main/resources/application.yml | 10 +- .../api/mapper/BehandlingMapperTest.kt | 8 +- 13 files changed, 305 insertions(+), 9 deletions(-) create mode 100644 src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OffsetDateTimeToLocalDateTimeDeserializer.kt create mode 100644 src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiClient.kt create mode 100644 src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiRecord.kt create mode 100644 src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt create mode 100644 src/main/kotlin/no/nav/klage/oppgave/service/OppgaveApiService.kt diff --git a/build.gradle.kts b/build.gradle.kts index 712dec93a..efc83db64 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,7 @@ val tikaVersion = "2.9.2" val verapdfVersion = "1.26.1" val klageKodeverkVersion = "1.8.37" val commonsFileupload2JakartaVersion = "2.0.0-M1" +val otelVersion = "1.40.0" plugins { val kotlinVersion = "2.0.0" @@ -66,6 +67,8 @@ dependencies { implementation("io.micrometer:micrometer-registry-prometheus") implementation("io.micrometer:micrometer-tracing-bridge-brave") + implementation("io.opentelemetry:opentelemetry-api:$otelVersion") + implementation("net.javacrumbs.shedlock:shedlock-spring:$shedlockVersion") implementation("net.javacrumbs.shedlock:shedlock-provider-jdbc-template:$shedlockVersion") diff --git a/src/main/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapper.kt b/src/main/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapper.kt index 8c9c06cd8..61be1743c 100644 --- a/src/main/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapper.kt +++ b/src/main/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapper.kt @@ -11,10 +11,7 @@ import no.nav.klage.oppgave.clients.norg2.Norg2Client import no.nav.klage.oppgave.clients.pdl.PdlFacade import no.nav.klage.oppgave.clients.pdl.Person import no.nav.klage.oppgave.domain.klage.* -import no.nav.klage.oppgave.service.DokDistKanalService -import no.nav.klage.oppgave.service.KodeverkService -import no.nav.klage.oppgave.service.RegoppslagService -import no.nav.klage.oppgave.service.SaksbehandlerService +import no.nav.klage.oppgave.service.* import no.nav.klage.oppgave.util.getLogger import org.springframework.stereotype.Service import org.springframework.transaction.annotation.Transactional @@ -34,6 +31,7 @@ class BehandlingMapper( private val kodeverkService: KodeverkService, private val regoppslagService: RegoppslagService, private val dokDistKanalService: DokDistKanalService, + private val oppgaveApiService: OppgaveApiService, ) { companion object { @@ -104,6 +102,7 @@ class BehandlingMapper( saksbehandler = klagebehandling.toSaksbehandlerView(), previousSaksbehandler = klagebehandling.toPreviousSaksbehandlerView(), varsletFrist = klagebehandling.varsletFrist, + oppgavebeskrivelse = getOppgavebeskrivelse(klagebehandling.oppgaveId), ) } @@ -206,6 +205,7 @@ class BehandlingMapper( saksbehandler = ankebehandling.toSaksbehandlerView(), previousSaksbehandler = ankebehandling.toPreviousSaksbehandlerView(), varsletFrist = ankebehandling.varsletFrist, + oppgavebeskrivelse = getOppgavebeskrivelse(ankebehandling.oppgaveId), ) } @@ -259,9 +259,18 @@ class BehandlingMapper( saksbehandler = ankeITrygderettenbehandling.toSaksbehandlerView(), previousSaksbehandler = ankeITrygderettenbehandling.toPreviousSaksbehandlerView(), varsletFrist = null, + oppgavebeskrivelse = getOppgavebeskrivelse(ankeITrygderettenbehandling.oppgaveId), ) } + private fun getOppgavebeskrivelse(oppgaveId: Long?): String? { + return if (oppgaveId == null) { + null + } else { + oppgaveApiService.getOppgaveEntryView(oppgaveId) + } + } + fun getSakenGjelderView(sakenGjelder: SakenGjelder): BehandlingDetaljerView.SakenGjelderView { if (sakenGjelder.erPerson()) { val person = pdlFacade.getPersonInfo(sakenGjelder.partId.value) diff --git a/src/main/kotlin/no/nav/klage/oppgave/api/view/BehandlingDetaljerView.kt b/src/main/kotlin/no/nav/klage/oppgave/api/view/BehandlingDetaljerView.kt index fe737252c..7d83b65f1 100644 --- a/src/main/kotlin/no/nav/klage/oppgave/api/view/BehandlingDetaljerView.kt +++ b/src/main/kotlin/no/nav/klage/oppgave/api/view/BehandlingDetaljerView.kt @@ -48,6 +48,7 @@ data class BehandlingDetaljerView( val saksbehandler: SaksbehandlerView?, val previousSaksbehandler: SaksbehandlerView?, val varsletFrist: LocalDate?, + val oppgavebeskrivelse: String?, ) { data class CombinedMedunderskriverAndROLView( diff --git a/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OffsetDateTimeToLocalDateTimeDeserializer.kt b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OffsetDateTimeToLocalDateTimeDeserializer.kt new file mode 100644 index 000000000..ee9b188b2 --- /dev/null +++ b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OffsetDateTimeToLocalDateTimeDeserializer.kt @@ -0,0 +1,15 @@ +package no.nav.klage.oppgave.clients.oppgaveapi + +import com.fasterxml.jackson.core.JsonParser +import com.fasterxml.jackson.databind.DeserializationContext +import com.fasterxml.jackson.databind.deser.std.StdDeserializer +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter + +class OffsetDateTimeToLocalDateTimeDeserializer : StdDeserializer(LocalDateTime::class.java) { + + override fun deserialize(jsonParser: JsonParser, ctxt: DeserializationContext?): LocalDateTime { + return LocalDateTime.parse(jsonParser.readValueAs(String::class.java), DateTimeFormatter.ISO_OFFSET_DATE_TIME) + } + +} \ No newline at end of file diff --git a/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiClient.kt b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiClient.kt new file mode 100644 index 000000000..e1350112e --- /dev/null +++ b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiClient.kt @@ -0,0 +1,69 @@ +package no.nav.klage.oppgave.clients.oppgaveapi + +import no.nav.klage.oppgave.util.TokenUtil +import org.springframework.beans.factory.annotation.Value +import org.springframework.web.reactive.function.client.WebClient +import io.opentelemetry.api.trace.Span +import no.nav.klage.oppgave.util.getLogger +import no.nav.klage.oppgave.util.getSecureLogger + +import org.springframework.http.HttpHeaders +import org.springframework.stereotype.Component +import org.springframework.web.reactive.function.client.WebClientResponseException + +import org.springframework.web.reactive.function.client.bodyToMono + +@Component +class OppgaveApiClient( + private val oppgaveApiWebClient: WebClient, + private val tokenUtil: TokenUtil, + @Value("\${spring.application.name}") private val applicationName: String, +){ + + companion object { + @Suppress("JAVA_CLASS_ON_COMPANION") + private val logger = getLogger(javaClass.enclosingClass) + private val securelogger = getSecureLogger() + } + + fun getOppgave(oppgaveId: Long): OppgaveApiRecord { + return logTimingAndWebClientResponseException(OppgaveApiClient::getOppgave.name) { + oppgaveApiWebClient.get() + .uri { uriBuilder -> + uriBuilder.pathSegment("oppgaver", "{id}").build(oppgaveId) + } + .header( + HttpHeaders.AUTHORIZATION, + "Bearer ${tokenUtil.getSaksbehandlerAccessTokenWithOppgaveApiScope()}" + ) + .header("X-Correlation-ID", Span.current().spanContext.traceId) + .header("Nav-Consumer-Id", applicationName) + .retrieve() + .bodyToMono() + .block() ?: throw OppgaveClientException("Oppgave could not be fetched") + } + } + + private fun logTimingAndWebClientResponseException(methodName: String, function: () -> T): T { + val start: Long = System.currentTimeMillis() + try { + return function.invoke() + } catch (ex: WebClientResponseException) { + logger.warn("Caught WebClientResponseException, see securelogs for details") + securelogger.error( + "Got a {} error calling Oppgave {} {} with message {}", + ex.statusCode, + ex.request?.method ?: "-", + ex.request?.uri ?: "-", + ex.responseBodyAsString + ) + throw OppgaveClientException("Caught WebClientResponseException", ex) + } catch (rtex: RuntimeException) { + logger.warn("Caught RuntimeException", rtex) + throw OppgaveClientException("Caught runtimeexception", rtex) + } finally { + val end: Long = System.currentTimeMillis() + logger.info("Method {} took {} millis", methodName, (end - start)) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiRecord.kt b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiRecord.kt new file mode 100644 index 000000000..1bd651554 --- /dev/null +++ b/src/main/kotlin/no/nav/klage/oppgave/clients/oppgaveapi/OppgaveApiRecord.kt @@ -0,0 +1,128 @@ +package no.nav.klage.oppgave.clients.oppgaveapi + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.databind.annotation.JsonDeserialize +import java.time.LocalDate +import java.time.LocalDateTime + +@JsonIgnoreProperties(ignoreUnknown = true) +data class OppgaveApiRecord( + val id: Long, + val versjon: Int, + val journalpostId: String?, + val saksreferanse: String?, + val mappeId: Long?, + val status: Status?, + val tildeltEnhetsnr: String?, + val opprettetAvEnhetsnr: String?, + val endretAvEnhetsnr: String?, + val tema: String, + val temagruppe: String?, + val behandlingstema: String?, + val oppgavetype: String?, + val behandlingstype: String?, + val prioritet: Prioritet?, + val tilordnetRessurs: String?, + val beskrivelse: String?, + val fristFerdigstillelse: LocalDate?, + val aktivDato: String?, + val opprettetAv: String?, + val endretAv: String?, + @JsonDeserialize(using = OffsetDateTimeToLocalDateTimeDeserializer::class) + val opprettetTidspunkt: LocalDateTime, + @JsonDeserialize(using = OffsetDateTimeToLocalDateTimeDeserializer::class) + val endretTidspunkt: LocalDateTime?, + @JsonDeserialize(using = OffsetDateTimeToLocalDateTimeDeserializer::class) + val ferdigstiltTidspunkt: LocalDateTime?, + val behandlesAvApplikasjon: String?, + val journalpostkilde: String?, + val identer: List?, + val metadata: Map?, + val bnr: String?, + val samhandlernr: String?, + val aktoerId: String?, + val orgnr: String?, +) + +enum class Status(val statusId: Long) { + + OPPRETTET(1), + AAPNET(2), + UNDER_BEHANDLING(3), + FERDIGSTILT(4), + FEILREGISTRERT(5); + + companion object { + + fun of(statusId: Long): Status { + return entries.firstOrNull { it.statusId == statusId } + ?: throw IllegalArgumentException("No status with $statusId exists") + } + + fun kategoriForStatus(status: Status): Statuskategori { + return when (status) { + AAPNET, OPPRETTET, UNDER_BEHANDLING -> Statuskategori.AAPEN + FEILREGISTRERT, FERDIGSTILT -> Statuskategori.AVSLUTTET + } + } + } + + fun kategoriForStatus(): Statuskategori { + return kategoriForStatus(this) + } +} + +enum class Prioritet { + HOY, + NORM, + LAV +} + +data class Ident( + val id: Long?, + val identType: IdentType, + val verdi: String, + val folkeregisterident: String?, + val registrertDato: LocalDate? +) + +enum class IdentType { + AKTOERID, ORGNR, SAMHANDLERNR, BNR +} + +enum class Statuskategori { + AAPEN, + AVSLUTTET; + + fun statuserForKategori(kategori: Statuskategori): List { + return when (kategori) { + AAPEN -> aapen() + AVSLUTTET -> avsluttet() + } + } + + fun avsluttet(): List { + return listOf(Status.FERDIGSTILT, Status.FEILREGISTRERT) + } + + fun aapen(): List { + return listOf(Status.OPPRETTET, Status.AAPNET, Status.UNDER_BEHANDLING) + } +} + +data class OppgaveResponse( + val antallTreffTotalt: Int, + val oppgaver: List +) + +class OppgaveClientException : Exception { + constructor(message: String?) : super(message) + + constructor(message: String?, cause: Throwable?) : super(message, cause) +} + +data class FerdigstillOppgaveRequest( + val oppgaveId: Long, + val versjon: Int, + val status: Status = Status.FERDIGSTILT, +) \ No newline at end of file diff --git a/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt b/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt new file mode 100644 index 000000000..e866cdcfd --- /dev/null +++ b/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt @@ -0,0 +1,27 @@ +package no.nav.klage.oppgave.config + +import org.springframework.beans.factory.annotation.Value +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.http.HttpHeaders +import org.springframework.http.MediaType +import org.springframework.http.client.reactive.ReactorClientHttpConnector +import org.springframework.web.reactive.function.client.WebClient +import reactor.netty.http.client.HttpClient.newConnection + +@Configuration +class OppgaveApiClientConfiguration(private val webClientBuilder: WebClient.Builder) { + @Value("\${OPPGAVE_API_BASE_URL}") + private lateinit var oppgaveBaseURL: String + + @Bean("oppgaveApiWebClient") + fun oppgaveApiWebClient(): WebClient { + return webClientBuilder + .baseUrl(oppgaveBaseURL) + .defaultHeader(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE) + .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .clientConnector(ReactorClientHttpConnector(newConnection())) + .build() + } + +} diff --git a/src/main/kotlin/no/nav/klage/oppgave/service/OppgaveApiService.kt b/src/main/kotlin/no/nav/klage/oppgave/service/OppgaveApiService.kt new file mode 100644 index 000000000..6d50f5899 --- /dev/null +++ b/src/main/kotlin/no/nav/klage/oppgave/service/OppgaveApiService.kt @@ -0,0 +1,24 @@ +package no.nav.klage.oppgave.service + +import no.nav.klage.oppgave.clients.oppgaveapi.OppgaveApiClient +import no.nav.klage.oppgave.util.getLogger +import no.nav.klage.oppgave.util.getSecureLogger +import org.springframework.stereotype.Service + +@Service +class OppgaveApiService( + private val oppgaveApiClient: OppgaveApiClient +) { + + companion object { + @Suppress("JAVA_CLASS_ON_COMPANION") + private val logger = getLogger(javaClass.enclosingClass) + private val securelogger = getSecureLogger() + } + + fun getOppgaveEntryView(oppgaveId: Long): String? { + val oppgave = oppgaveApiClient.getOppgave(oppgaveId = oppgaveId) + return oppgave.beskrivelse + } + +} \ No newline at end of file diff --git a/src/main/kotlin/no/nav/klage/oppgave/util/TokenUtil.kt b/src/main/kotlin/no/nav/klage/oppgave/util/TokenUtil.kt index 1a5a4d31f..99cc98af4 100644 --- a/src/main/kotlin/no/nav/klage/oppgave/util/TokenUtil.kt +++ b/src/main/kotlin/no/nav/klage/oppgave/util/TokenUtil.kt @@ -181,6 +181,12 @@ class TokenUtil( return response.accessToken!! } + fun getSaksbehandlerAccessTokenWithOppgaveApiScope(): String { + val clientProperties = clientConfigurationProperties.registration["oppgave-api-onbehalfof"]!! + val response = oAuth2AccessTokenService.getAccessToken(clientProperties) + return response.accessToken!! + } + fun getAccessTokenFrontendSent(): String = tokenValidationContextHolder.getTokenValidationContext().getJwtToken(SecurityConfiguration.ISSUER_AAD)!!.encodedToken diff --git a/src/main/resources/application-dev-gcp.yml b/src/main/resources/application-dev-gcp.yml index 89fc86774..198d14dc8 100644 --- a/src/main/resources/application-dev-gcp.yml +++ b/src/main/resources/application-dev-gcp.yml @@ -49,6 +49,9 @@ ARBEID_OG_INNTEKT_URL: https://arbeid-og-inntekt-q2.dev-fss-pub.nais.io/ KLAGE_FSS_PROXY_URL: https://klage-fss-proxy.dev-fss-pub.nais.io +OPPGAVE_API_BASE_URL: https://oppgave.dev-fss-pub.nais.io/api/v1 +OPPGAVE_API_SCOPE: dev-fss.oppgavehandtering.oppgave + FSS_CLUSTER: dev-fss SETTINGS_CLEANUP_CRON: 0 0 12 * * MON diff --git a/src/main/resources/application-prod-gcp.yml b/src/main/resources/application-prod-gcp.yml index 727f26079..b04df117a 100644 --- a/src/main/resources/application-prod-gcp.yml +++ b/src/main/resources/application-prod-gcp.yml @@ -47,6 +47,9 @@ ARBEID_OG_INNTEKT_URL: https://arbeid-og-inntekt.prod-fss-pub.nais.io/ KLAGE_FSS_PROXY_URL: https://klage-fss-proxy.prod-fss-pub.nais.io +OPPGAVE_API_BASE_URL: https://oppgave.prod-fss-pub.nais.io/api/v1 +OPPGAVE_API_SCOPE: prod-fss.oppgavehandtering.oppgave + FSS_CLUSTER: prod-fss SETTINGS_CLEANUP_CRON: 0 15 16 * * WED \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b236dcdc4..8eb801923 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -31,7 +31,7 @@ spring: timeout-per-shutdown-phase: 20s servlet: multipart: - enabled: false + enabled: false codec: max-in-memory-size: 512MB sql: @@ -303,6 +303,14 @@ no.nav.security.jwt: client-id: ${AZURE_APP_CLIENT_ID} client-jwk: ${AZURE_APP_JWK} client-auth-method: private_key_jwt + oppgave-api-onbehalfof: + token-endpoint-url: https://login.microsoftonline.com/${TENANT_ID}/oauth2/v2.0/token + grant-type: urn:ietf:params:oauth:grant-type:jwt-bearer + scope: api://${OPPGAVE_SCOPE}/.default + authentication: + client-id: ${AZURE_APP_CLIENT_ID} + client-jwk: ${AZURE_APP_JWK} + client-auth-method: private_key_jwt MICROSOFT_GRAPH_URL: https://graph.microsoft.com/v1.0 diff --git a/src/test/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapperTest.kt b/src/test/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapperTest.kt index d0fab43bc..806639734 100644 --- a/src/test/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapperTest.kt +++ b/src/test/kotlin/no/nav/klage/oppgave/api/mapper/BehandlingMapperTest.kt @@ -10,10 +10,7 @@ import no.nav.klage.oppgave.clients.krrproxy.KrrProxyClient import no.nav.klage.oppgave.clients.norg2.Norg2Client import no.nav.klage.oppgave.clients.pdl.PdlFacade import no.nav.klage.oppgave.domain.klage.* -import no.nav.klage.oppgave.service.DokDistKanalService -import no.nav.klage.oppgave.service.KodeverkService -import no.nav.klage.oppgave.service.RegoppslagService -import no.nav.klage.oppgave.service.SaksbehandlerService +import no.nav.klage.oppgave.service.* import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.springframework.beans.factory.annotation.Autowired @@ -56,6 +53,9 @@ class BehandlingMapperTest { @MockkBean lateinit var dokDistKanalService: DokDistKanalService + @MockkBean + lateinit var oppgaveApiService: OppgaveApiService + @Autowired lateinit var behandlingMapper: BehandlingMapper From bca4f23849d3df00a8e6eb0d0ed8b035560638c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20N=2E=20Wed=C3=B8e?= Date: Tue, 3 Sep 2024 11:31:43 +0200 Subject: [PATCH 2/3] Correct scope. --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 8eb801923..2794f42b9 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -306,7 +306,7 @@ no.nav.security.jwt: oppgave-api-onbehalfof: token-endpoint-url: https://login.microsoftonline.com/${TENANT_ID}/oauth2/v2.0/token grant-type: urn:ietf:params:oauth:grant-type:jwt-bearer - scope: api://${OPPGAVE_SCOPE}/.default + scope: api://${OPPGAVE_API_SCOPE}/.default authentication: client-id: ${AZURE_APP_CLIENT_ID} client-jwk: ${AZURE_APP_JWK} From 6b9e391416830dd7da82c21569fd69746291c10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20N=2E=20Wed=C3=B8e?= Date: Tue, 3 Sep 2024 12:33:33 +0200 Subject: [PATCH 3/3] Removed unnecessary explicit naming. --- .../nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt b/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt index e866cdcfd..69eb11dea 100644 --- a/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt +++ b/src/main/kotlin/no/nav/klage/oppgave/config/OppgaveApiClientConfiguration.kt @@ -14,7 +14,7 @@ class OppgaveApiClientConfiguration(private val webClientBuilder: WebClient.Buil @Value("\${OPPGAVE_API_BASE_URL}") private lateinit var oppgaveBaseURL: String - @Bean("oppgaveApiWebClient") + @Bean fun oppgaveApiWebClient(): WebClient { return webClientBuilder .baseUrl(oppgaveBaseURL)