Skip to content

Commit 260968d

Browse files
authored
Migrated to Java 25, Springboot 3.5.7 (#17)
1 parent 1b433eb commit 260968d

14 files changed

Lines changed: 100 additions & 90 deletions

File tree

.github/workflows/tf-identity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- uses: actions/checkout@v5
2525
with:
2626
fetch-depth: 0
27-
- name: Set up JDK 21
27+
- name: Set up JDK 25
2828
uses: actions/setup-java@v5
2929
with:
30-
java-version: 21
30+
java-version: 25
3131
distribution: 'temurin'
3232
cache: maven
3333
- name: Build with Maven

.github/workflows/tf-management.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
- uses: actions/checkout@v5
2727
with:
2828
fetch-depth: 0
29-
- name: Set up JDK 21
29+
- name: Set up JDK 25
3030
uses: actions/setup-java@v5
3131
with:
32-
java-version: 21
32+
java-version: 25
3333
distribution: 'temurin'
3434
cache: maven
3535
- name: Build with Maven

.github/workflows/tf-session.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
- uses: actions/checkout@v5
2727
with:
2828
fetch-depth: 0
29-
- name: Set up JDK 21
29+
- name: Set up JDK 25
3030
uses: actions/setup-java@v5
3131
with:
32-
java-version: 21
32+
java-version: 25
3333
distribution: 'temurin'
3434
cache: maven
3535
- name: Build with Maven

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ For the Global Service:
4242

4343
**Requirements**
4444
- MongoDB
45-
- Java 21
46-
- Maven 3.9
45+
- Java 25
46+
- Maven 3.11
4747

4848
Run the services indicated by the module name:
4949
```

pom.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@
2424
<parent>
2525
<groupId>org.springframework.boot</groupId>
2626
<artifactId>spring-boot-starter-parent</artifactId>
27-
<version>3.5.6</version>
27+
<version>3.5.7</version>
2828
<relativePath />
2929
</parent>
3030

3131
<properties>
32-
<java.version>21</java.version>
32+
<java.version>25</java.version>
3333
<maven.compiler.source>${java.version}</maven.compiler.source>
3434
<maven.compiler.target>${java.version}</maven.compiler.target>
35-
<commons-lang3.version>3.18.0</commons-lang3.version>
35+
<commons-lang3.version>3.19.0</commons-lang3.version>
3636

3737
<!-- Test-->
3838
<flapdoodle.embed.mongo.version>4.21.0</flapdoodle.embed.mongo.version>
3939

4040
<!-- Plugins -->
41-
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
41+
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
4242
<sonar-maven-plugin.version>5.2.0.4988</sonar-maven-plugin.version>
43-
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
43+
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
4444

4545
<!-- Sonar -->
4646
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
@@ -97,6 +97,16 @@
9797
<groupId>org.apache.maven.plugins</groupId>
9898
<artifactId>maven-compiler-plugin</artifactId>
9999
<version>${maven-compiler-plugin.version}</version>
100+
<configuration>
101+
<source>${java.version}</source>
102+
<target>${java.version}</target>
103+
<annotationProcessorPaths>
104+
<path>
105+
<groupId>org.projectlombok</groupId>
106+
<artifactId>lombok</artifactId>
107+
</path>
108+
</annotationProcessorPaths>
109+
</configuration>
100110
</plugin>
101111
<plugin>
102112
<groupId>org.sonarsource.scanner.maven</groupId>

trackerforce-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<properties>
3131
<jsonwebtoken.version>0.13.0</jsonwebtoken.version>
32-
<springdoc-openapi-starter-webmvc-ui.version>2.8.13</springdoc-openapi-starter-webmvc-ui.version>
32+
<springdoc-openapi-starter-webmvc-ui.version>2.8.14</springdoc-openapi-starter-webmvc-ui.version>
3333
</properties>
3434

3535
<dependencies>

trackerforce-common/src/main/java/com/trackerforce/common/config/ConfigProperties.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

trackerforce-common/src/main/java/com/trackerforce/common/config/OpenAPIConfiguration.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ public class OpenAPIConfiguration {
1818

1919
private static final String SCHEME = "Bearer";
2020

21-
private final ConfigProperties configProperties;
21+
private final ServiceConfig.Docs docs;
2222

23-
public OpenAPIConfiguration(ConfigProperties configProperties) {
24-
this.configProperties = configProperties;
23+
public OpenAPIConfiguration(ServiceConfig serviceConfig) {
24+
this.docs = serviceConfig.docs();
2525
}
2626

2727
@Bean
2828
public OpenAPI customOpenAPI() {
2929
var openApi = new OpenAPI()
30-
.addServersItem(new Server().url(configProperties.getUrl()))
30+
.addServersItem(new Server().url(docs.url()))
3131
.info(getInfo());
3232

3333
addSecurity(openApi);
@@ -36,23 +36,23 @@ public OpenAPI customOpenAPI() {
3636

3737
private Info getInfo() {
3838
return new Info()
39-
.title(configProperties.getTitle())
40-
.description(configProperties.getDescription())
41-
.version(configProperties.getVersion())
39+
.title(docs.title())
40+
.description(docs.description())
41+
.version(docs.version())
4242
.contact(getContact())
4343
.license(getLicense());
4444
}
4545

4646
private License getLicense() {
4747
return new License()
48-
.name(configProperties.getLicense().getType())
49-
.url(configProperties.getLicense().getUrl());
48+
.name(docs.license().type())
49+
.url(docs.license().url());
5050
}
51-
51+
5252
private Contact getContact() {
5353
return new Contact()
54-
.name(configProperties.getContact().getAuthor())
55-
.email(configProperties.getContact().getEmail());
54+
.name(docs.contact().author())
55+
.email(docs.contact().email());
5656
}
5757

5858
private void addSecurity(OpenAPI openApi) {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.trackerforce.common.config;
2+
3+
import org.springframework.boot.context.properties.ConfigurationProperties;
4+
5+
@ConfigurationProperties(prefix = "service")
6+
public record ServiceConfig(
7+
Docs docs
8+
) {
9+
10+
public record Docs(
11+
String title,
12+
String description,
13+
String version,
14+
String releaseTime,
15+
String url,
16+
License license,
17+
Contact contact) {
18+
19+
public record License(
20+
String type,
21+
String url) { }
22+
23+
public record Contact(
24+
String author,
25+
String email) { }
26+
}
27+
}

trackerforce-identity/src/main/java/com/trackerforce/identity/TrackerforceIdentityApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
import org.springframework.boot.SpringApplication;
44
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
56
import org.springframework.context.annotation.ComponentScan;
67

78
@SpringBootApplication
9+
@ConfigurationPropertiesScan(basePackages = { "com.trackerforce" })
810
@ComponentScan(basePackages = { "com.trackerforce" })
911
public class TrackerforceIdentityApplication {
1012

0 commit comments

Comments
 (0)