Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tf-identity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tf-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tf-session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: 21
java-version: 25
distribution: 'temurin'
cache: maven
- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ For the Global Service:

**Requirements**
- MongoDB
- Java 21
- Maven 3.9
- Java 25
- Maven 3.11

Run the services indicated by the module name:
```
Expand Down
20 changes: 15 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.6</version>
<version>3.5.7</version>
<relativePath />
</parent>

<properties>
<java.version>21</java.version>
<java.version>25</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<commons-lang3.version>3.18.0</commons-lang3.version>
<commons-lang3.version>3.19.0</commons-lang3.version>

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

<!-- Plugins -->
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
<sonar-maven-plugin.version>5.2.0.4988</sonar-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>

<!-- Sonar -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
Expand Down Expand Up @@ -97,6 +97,16 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
Expand Down
2 changes: 1 addition & 1 deletion trackerforce-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<properties>
<jsonwebtoken.version>0.13.0</jsonwebtoken.version>
<springdoc-openapi-starter-webmvc-ui.version>2.8.13</springdoc-openapi-starter-webmvc-ui.version>
<springdoc-openapi-starter-webmvc-ui.version>2.8.14</springdoc-openapi-starter-webmvc-ui.version>
</properties>

<dependencies>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ public class OpenAPIConfiguration {

private static final String SCHEME = "Bearer";

private final ConfigProperties configProperties;
private final ServiceConfig.Docs docs;

public OpenAPIConfiguration(ConfigProperties configProperties) {
this.configProperties = configProperties;
public OpenAPIConfiguration(ServiceConfig serviceConfig) {
this.docs = serviceConfig.docs();
}

@Bean
public OpenAPI customOpenAPI() {
var openApi = new OpenAPI()
.addServersItem(new Server().url(configProperties.getUrl()))
.addServersItem(new Server().url(docs.url()))
.info(getInfo());

addSecurity(openApi);
Expand All @@ -36,23 +36,23 @@ public OpenAPI customOpenAPI() {

private Info getInfo() {
return new Info()
.title(configProperties.getTitle())
.description(configProperties.getDescription())
.version(configProperties.getVersion())
.title(docs.title())
.description(docs.description())
.version(docs.version())
.contact(getContact())
.license(getLicense());
}

private License getLicense() {
return new License()
.name(configProperties.getLicense().getType())
.url(configProperties.getLicense().getUrl());
.name(docs.license().type())
.url(docs.license().url());
}

private Contact getContact() {
return new Contact()
.name(configProperties.getContact().getAuthor())
.email(configProperties.getContact().getEmail());
.name(docs.contact().author())
.email(docs.contact().email());
}

private void addSecurity(OpenAPI openApi) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.trackerforce.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "service")
public record ServiceConfig(
Docs docs
) {

public record Docs(
String title,
String description,
String version,
String releaseTime,
String url,
License license,
Contact contact) {

public record License(
String type,
String url) { }

public record Contact(
String author,
String email) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ConfigurationPropertiesScan(basePackages = { "com.trackerforce" })
@ComponentScan(basePackages = { "com.trackerforce" })
public class TrackerforceIdentityApplication {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(scanBasePackages = "com.trackerforce")
@SpringBootApplication
@ConfigurationPropertiesScan(basePackages = { "com.trackerforce" })
@ComponentScan(basePackages = { "com.trackerforce" })
public class TrackerforceManagementApplication {

public static void main(String[] args) {
Expand Down
2 changes: 1 addition & 1 deletion trackerforce-session/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<trackerforce-common-tenancy.version>0.0.2-SNAPSHOT</trackerforce-common-tenancy.version>
<switcher-client.version>2.4.1</switcher-client.version>
<switcher-client.version>2.5.1</switcher-client.version>
</properties>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.context.annotation.ComponentScan;

import static com.trackerforce.session.config.Features.*;

@SpringBootApplication(scanBasePackages = "com.trackerforce")
@SpringBootApplication
@ConfigurationPropertiesScan(basePackages = { "com.trackerforce" })
@ComponentScan(basePackages = { "com.trackerforce" })
public class TrackerforceSessionApplication implements CommandLineRunner {

public static void main(String[] args) {
Expand Down
50 changes: 24 additions & 26 deletions trackerforce-session/src/main/resources/snapshots/default.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
{
"data": {
"domain": {
"name": "Trackerforce",
"version": 1632024551905,
"group": [
{
"name": "Services",
"config": [
{
"key": "ML_SERVICE",
"strategies": [],
"components": [
"queue-service",
"session-service"
],
"description": "Invoke Machine Learning Engine Service",
"activated": true
}
],
"description": "",
"activated": true
}
],
"description": "",
"activated": true
}
"domain": {
"name": "Trackerforce",
"version": 1632024551905,
"group": [
{
"name": "Services",
"config": [
{
"key": "ML_SERVICE",
"strategies": [],
"components": [
"queue-service",
"session-service"
],
"description": "Invoke Machine Learning Engine Service",
"activated": true
}
],
"description": "",
"activated": true
}
],
"description": "",
"activated": true
}
}