This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
R!! konverter PdlOppslagConfig til Kotlin
Fjerner statisk felt / companion object const for å unngå konflikt med PdlOppslagConfig i test
- Loading branch information
Showing
2 changed files
with
22 additions
and
25 deletions.
There are no files selected for viewing
25 changes: 0 additions & 25 deletions
25
src/main/java/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagConfig.java
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/main/java/no/nav/fo/veilarbregistrering/bruker/pdl/PdlOppslagConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package no.nav.fo.veilarbregistrering.bruker.pdl | ||
|
||
import no.nav.common.sts.SystemUserTokenProvider | ||
import no.nav.common.utils.EnvironmentUtils | ||
import no.nav.fo.veilarbregistrering.bruker.PdlOppslagGateway | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class PdlOppslagConfig { | ||
|
||
@Bean | ||
fun pdlOppslagClient(systemUserTokenProvider: SystemUserTokenProvider): PdlOppslagClient { | ||
val baseUrl = EnvironmentUtils.getRequiredProperty("PDL_URL") | ||
return PdlOppslagClient(baseUrl, systemUserTokenProvider) | ||
} | ||
|
||
@Bean | ||
fun pdlOppslagGateway(pdlOppslagClient: PdlOppslagClient): PdlOppslagGateway { | ||
return PdlOppslagGatewayImpl(pdlOppslagClient) | ||
} | ||
} |