Migrate to Spring Boot 4 (#868)

* Switched from TomCat to Jetty
* Hibernate migrations
* Removed dependency on Spring-Boot-Content-FS
* Migrate to Jackson 3
* Migrate LegacyExtensionFinder -> IndexedExtensionFinder
* Fix code inspection issues
* Exclude Config classes from Sonar coverage calcualtion
* Add FileStorageServiceTest
* Add tests for (De-)serializers
* Exclude H2 package from Sonar coverage reporting
* Add Sonar scan
* Update JVM in CI
* Update dependency versions
This commit is contained in:
grimsi
2026-02-01 10:48:26 +01:00
parent 111e164fab
commit ecd369cd30
103 changed files with 3562 additions and 2928 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
val jacksonVersion = "2.19.1"
val jacksonVersion = "3.0.4"
plugins {
kotlin("jvm")
@@ -16,8 +16,8 @@ dependencies {
implementation("io.github.oshai:kotlin-logging-jvm:7.0.3")
// JSON serialization
compileOnly("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
compileOnly("tools.jackson.core:jackson-databind:$jacksonVersion")
implementation("tools.jackson.module:jackson-module-kotlin:$jacksonVersion")
}
mavenPublishing {
@@ -132,11 +132,11 @@ abstract class ConfigurableGameyfinPlugin(wrapper: PluginWrapper) : GameyfinPlug
// Try to convert common types
try {
return when (expectedType) {
Int::class.java, Integer::class.java -> value.toString().toInt()
Float::class.java, java.lang.Float::class.java -> value.toString().toFloat()
Double::class.java, java.lang.Double::class.java -> value.toString().toDouble()
Long::class.java, java.lang.Long::class.java -> value.toString().toLong()
Boolean::class.java, java.lang.Boolean::class.java -> value.toString().toBooleanStrict()
Int::class.java -> value.toString().toInt()
Float::class.java -> value.toString().toFloat()
Double::class.java -> value.toString().toDouble()
Long::class.java -> value.toString().toLong()
Boolean::class.java -> value.toString().toBooleanStrict()
String::class.java -> value.toString()
else -> {
// Try valueOf(String) or parse(String) via reflection
@@ -1,9 +1,10 @@
package org.gameyfin.pluginapi.core.wrapper
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.KotlinModule
import org.pf4j.Plugin
import org.pf4j.PluginWrapper
import tools.jackson.databind.ObjectMapper
import tools.jackson.module.kotlin.jsonMapper
import tools.jackson.module.kotlin.kotlinModule
import java.io.IOException
import java.nio.file.Files
import java.nio.file.Path
@@ -48,7 +49,9 @@ abstract class GameyfinPlugin(wrapper: PluginWrapper) : Plugin(wrapper) {
/**
* JSON serializer for serializing and deserializing plugin state.
*/
val objectMapper: ObjectMapper = ObjectMapper().registerModule(KotlinModule.Builder().build())
val objectMapper: ObjectMapper = jsonMapper {
addModule(kotlinModule())
}
/**
* Checks if the plugin contains a logo file in any supported format.