Skip to content

Commit

Permalink
Merge pull request #138 from MichiBaum/develop
Browse files Browse the repository at this point in the history
Update to Java 21 and clean up dependencies.
  • Loading branch information
MichiBaum authored Jan 3, 2025
2 parents b199e45 + 4ba3be2 commit a504c1d
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .run/All Project Tests.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ENTRIES>
</extension>
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-23" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-21" />
<option name="PACKAGE_NAME" value="com.michibaum" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
Expand Down
2 changes: 1 addition & 1 deletion .run/All UT.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ENTRIES>
</extension>
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-23" />
<option name="ALTERNATIVE_JRE_PATH" value="openjdk-21" />
<option name="PACKAGE_NAME" value="com.michibaum" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
Expand Down
2 changes: 1 addition & 1 deletion admin-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion authentication-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion chess-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion docs/Writerside/topics/Development.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Development

Requirements:
- Java 23 installed
- Java 21 installed
- Npm installed (lts is best)
- [Update hosts file](#update-hosts-file)
- Local dev database
Expand Down
2 changes: 1 addition & 1 deletion fitness-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion gateway-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion music-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,17 @@
<spring-boot-admin.version>3.4.1</spring-boot-admin.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<java.version>21</java.version>

<!--
https://stackoverflow.com/a/77179226/10258204
https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib
-->
<kotlin.version>2.1.0</kotlin.version>
<kotlin.compiler.languageVersion>2.1</kotlin.compiler.languageVersion>
<kotlin.compiler.jvmTarget>21</kotlin.compiler.jvmTarget>

<!--
https://mockk.io/
Expand Down Expand Up @@ -254,13 +256,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version> <!-- TODO check if version 3.1.1 works else revert to 3.0.1 -->
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
Expand Down Expand Up @@ -291,6 +286,11 @@
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.1.1</version> <!-- TODO check if version 3.1.1 works else revert to 3.0.1 -->
</plugin>

</plugins>
</build>
Expand Down
2 changes: 1 addition & 1 deletion registry-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.michibaum.discord.api

import com.fasterxml.jackson.databind.ObjectMapper
import com.michibaum.discord.api.dtos.*
import com.michibaum.discord.config.DiscordProperties
import org.springframework.core.ParameterizedTypeReference
Expand All @@ -16,11 +15,9 @@ import org.springframework.web.client.bodyWithType
* specific to the Discord API v10.
*
* @property properties Configuration properties containing the bot token and guild ID.
* @property objectMapper ObjectMapper instance for JSON serialization and deserialization.
*/
open class DiscordClientImpl(
private val properties: DiscordProperties,
private val objectMapper: ObjectMapper
private val properties: DiscordProperties
): DiscordClient {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.michibaum.discord.config

import com.fasterxml.jackson.databind.ObjectMapper
import com.michibaum.discord.api.DiscordClient
import com.michibaum.discord.api.DiscordClientImpl
import org.springframework.boot.autoconfigure.AutoConfiguration
Expand All @@ -20,31 +19,16 @@ import org.springframework.context.annotation.Bean
@ConditionalOnBean(value = [DiscordProperties::class])
class DiscordAutoConfiguration {

/**
* Provides an `ObjectMapper` bean for JSON processing.
*
* This method returns a singleton instance of `ObjectMapper` which is used for JSON serialization and
* deserialization throughout the application. The bean is only provided if an `ObjectMapper` bean
* is not already present in the application context.
*
* @return An instance of `ObjectMapper`.
*/
@Bean
@ConditionalOnMissingBean
fun objectMapper() = ObjectMapper()

/**
* Creates a `DiscordClient` bean if one is not already present in the application context.
*
* @param properties Configuration properties for the Discord integration.
* @param objectMapper The ObjectMapper instance for JSON processing.
* @return An instance of `DiscordClient`.
*/
@Bean
@ConditionalOnBean(value = [ObjectMapper::class])
@ConditionalOnMissingBean
fun discordClient(properties: DiscordProperties, objectMapper: ObjectMapper): DiscordClient {
return DiscordClientImpl(properties, objectMapper)
fun discordClient(properties: DiscordProperties): DiscordClient {
return DiscordClientImpl(properties)
}

}
2 changes: 1 addition & 1 deletion usermanagement-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down
2 changes: 1 addition & 1 deletion website-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<version>3.4.4</version>
<configuration>
<from>
<image>eclipse-temurin:23-jre-alpine</image>
<image>eclipse-temurin:21-jre-alpine</image>
<auth>
<!--suppress UnresolvedMavenProperty -->
<username>${dockerHub.username}</username>
Expand Down

0 comments on commit a504c1d

Please sign in to comment.