File tree Expand file tree Collapse file tree 5 files changed +12
-15
lines changed
src/main/kotlin/no/nav/tms/event/api Expand file tree Collapse file tree 5 files changed +12
-15
lines changed Original file line number Diff line number Diff line change 1
- FROM gcr.io/distroless/java17-debian11
2
- COPY build/libs/tms-event-api-all.jar app/app.jar
3
- ENV PORT=8080
4
- EXPOSE $PORT
5
- WORKDIR app
6
- CMD ["app.jar" ]
1
+ FROM ghcr.io/navikt/baseimages/temurin:21
2
+
3
+ ENV JAVA_OPTS='-XX:MaxRAMPercentage=75'
4
+
5
+ COPY build/libs/*.jar ./
Original file line number Diff line number Diff line change 1
1
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2
2
3
3
plugins {
4
- // Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
5
4
kotlin(" jvm" ).version(Kotlin .version)
6
5
kotlin(" plugin.serialization" ).version(Kotlin .version)
7
6
8
- id(Shadow .pluginId) version ( Shadow .version )
9
- // Apply the application plugin to add support for building a CLI application.
7
+ id(TmsJarBundling .plugin )
8
+
10
9
application
11
10
}
12
11
13
12
kotlin {
14
13
jvmToolchain {
15
- languageVersion.set(JavaLanguageVersion .of(17 ))
14
+ languageVersion.set(JavaLanguageVersion .of(21 ))
16
15
}
17
16
}
18
17
@@ -52,8 +51,6 @@ dependencies {
52
51
testImplementation(Kluent .kluent)
53
52
testImplementation(Mockk .mockk)
54
53
testImplementation(Junit .params)
55
- testImplementation(" io.ktor:ktor-server-test-host-jvm:2.3.5" )
56
- testImplementation(" org.jetbrains.kotlin:kotlin-test-junit:1.9.10" )
57
54
testImplementation(TmsTestUtils .testUtils)
58
55
59
56
testRuntimeOnly(Jjwt .impl)
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.7 -bin.zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.12 -bin.zip
4
4
networkTimeout =10000
5
5
validateDistributionUrl =true
6
6
zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ fun Application.api(
111
111
}
112
112
113
113
private fun Application.configureShutdownHook (httpClient : HttpClient ) {
114
- environment. monitor.subscribe(ApplicationStopping ) {
114
+ monitor.subscribe(ApplicationStopping ) {
115
115
httpClient.close()
116
116
}
117
117
}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import kotlinx.coroutines.Dispatchers
10
10
import kotlinx.coroutines.withContext
11
11
import no.nav.tms.event.api.config.AzureTokenFetcher
12
12
import no.nav.tms.token.support.azure.validation.AzureHeader
13
+ import java.net.URI
13
14
import java.net.URL
14
15
15
16
class VarselReader (
@@ -21,7 +22,7 @@ class VarselReader(
21
22
fnr : String ,
22
23
varselPath : String ,
23
24
): List <DetaljertVarsel > {
24
- val completePathToEndpoint = URL (" $varselAuthorityUrl /$varselPath " )
25
+ val completePathToEndpoint = URI .create (" $varselAuthorityUrl /$varselPath " ).toURL( )
25
26
val azureToken = azureTokenFetcher.fetchTokenForVarselAuthority()
26
27
return client.getWithAzureAndFnr(completePathToEndpoint, azureToken, fnr)
27
28
}
You can’t perform that action at this time.
0 commit comments