Skip to content

Commit

Permalink
FIKS-150 Oppgrader til Spring Boot 3 (#396)
Browse files Browse the repository at this point in the history
* Bruk ny pipeline

* Oppdater pipeline igjen

* FIKS-150 Endringer for Spring Boot 3
  • Loading branch information
zapodot authored Mar 22, 2023
1 parent 164f450 commit a26182b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libPipelineMvnCentral(
libPipelineMvnCentralJdk17(
dtProjectId: "5b5106ae-8298-421a-b578-9178de4a3887"
)
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ Mottatte access-token blir lagret i en cache og vil bli gjenbrukt frem til de ut
Dette er nyttig dersom det gjøres en forespørsel rett før tokenet utløper og det er fare for at tokenet blir ugyldig før forespørselen sendes.
Konfigurasjon gjøres ved initiering av klienten og styres i feltet "numberOfSecondsLeftBeforeExpire".

## Versjoner

| Versjon | Java baseline | Spring Boot versjon | Status |
|---------|---------------|---------------------|-------------|
| 3.x | Java 17 | 3.X | Aktiv |
| 2.X | Java 11 | 2.X | Vedlikehold |

### Status
- **Aktiv**: versjon som aktivt utvikles og holdes oppdatert mht. avhengigheter
- **Vedlikehold**: kun kritiske feil vil bli adressert


## Maven koordinater
```xml
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion maskinporten-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>no.ks.fiks</groupId>
<artifactId>maskinporten</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>maskinporten-client</artifactId>
<name>${project.artifactId}</name>
Expand Down
29 changes: 18 additions & 11 deletions maskinporten-spring-boot-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<spring-boot.version>2.7.9</spring-boot.version>
<kotest-extensions-spring.version>1.1.2</kotest-extensions-spring.version>
</properties>

<parent>
<groupId>no.ks.fiks</groupId>
<artifactId>maskinporten</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>maskinporten-spring-boot-client</artifactId>
<name>${project.artifactId}</name>
<properties>
<spring-boot.version>3.0.4</spring-boot.version>
<kotest-extensions-spring.version>1.1.2</kotest-extensions-spring.version>
</properties>

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -47,14 +46,19 @@
<artifactId>virksomhetssertifikat</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.kotest</groupId>
<artifactId>kotest-runner-junit5-jvm</artifactId>
Expand Down Expand Up @@ -85,7 +89,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test-autoconfigure</artifactId>
<version>${spring-boot.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -110,6 +113,10 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package no.ks.fiks.maskinporten

import jakarta.validation.constraints.NotNull
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.boot.context.properties.ConstructorBinding
import org.springframework.validation.annotation.Validated
import javax.validation.constraints.NotNull

internal const val DEFAULT_SECONDS_LEFT_BEFORE_EXPIRATION = 10

@ConstructorBinding
@ConfigurationProperties(prefix = "maskinporten")
@Validated
data class MaskinportenProperties(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
no.ks.fiks.maskinporten.MaskinportenAutoConfigure
19 changes: 5 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>no.ks.fiks.pom</groupId>
<artifactId>fiks-ekstern-kotlin-superpom</artifactId>
<version>1.0.20</version>
<version>1.0.21</version>
</parent>

<groupId>no.ks.fiks</groupId>
<artifactId>maskinporten</artifactId>
<version>2.2.1-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>${project.artifactId}</description>
Expand All @@ -30,20 +30,18 @@
</scm>

<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-surefire-plugin.version>3.0.0-M9</maven-surefire-plugin.version>

<nimbus-jose-jwt.version>9.31</nimbus-jose-jwt.version>
<virksomhetssertifikat.version>3.0.2</virksomhetssertifikat.version>
<virksomhetssertifikat.version>4.0.0</virksomhetssertifikat.version>
<expiringmap.version>0.5.10</expiringmap.version>
<mockserver.version>5.15.0</mockserver.version>
<lang-tag.version>1.7</lang-tag.version>
<oauth2-oidc-sdk.version>10.7</oauth2-oidc-sdk.version>
<hibernate-validator.version>6.2.3.Final</hibernate-validator.version>
<apache-httpclient.version>5.2.1</apache-httpclient.version>

<junit.version>5.9.2</junit.version>
Expand Down Expand Up @@ -78,12 +76,6 @@
<artifactId>maskinporten-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
Expand Down Expand Up @@ -179,7 +171,6 @@
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
Expand Down

0 comments on commit a26182b

Please sign in to comment.