diff options
author | Robert Jaros <rjaros@finn.pl> | 2020-02-23 03:20:17 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2020-02-23 03:20:17 +0100 |
commit | c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3 (patch) | |
tree | 5e415222a953dfcc3b1ed775bf781c1948463e09 | |
parent | 15d445841245fff0aed6aa45daf0ea61391cfd68 (diff) | |
download | kvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.tar.gz kvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.tar.bz2 kvision-c437ce4f6dfb5c9182c188d1c9512d8d9d4db3a3.zip |
Upgrade to Jooby 2.x
-rw-r--r-- | gradle.properties | 3 | ||||
-rw-r--r-- | kvision-modules/kvision-server-jooby/build.gradle | 8 | ||||
-rw-r--r-- | kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt | 11 |
3 files changed, 12 insertions, 10 deletions
diff --git a/gradle.properties b/gradle.properties index e3b8c067..fa6e420e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,11 +8,10 @@ frontendPluginVersion=0.0.45 dokkaVersion=0.9.18 detektVersion=1.0.0-RC14 junitVersion=4.12 -joobyVersion=1.6.6 +joobyVersion=2.6.1 springBootVersion=2.2.4.RELEASE ktorVersion=1.3.1 guiceVersion=4.2.2 -pac4jVersion=3.8.2 dependencyManagementPluginVersion=1.0.8.RELEASE jacksonModuleKotlinVersion=2.10.2 springDataRelationalVersion=1.1.4.RELEASE diff --git a/kvision-modules/kvision-server-jooby/build.gradle b/kvision-modules/kvision-server-jooby/build.gradle index e1b2e9f4..4d2823e2 100644 --- a/kvision-modules/kvision-server-jooby/build.gradle +++ b/kvision-modules/kvision-server-jooby/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlinx-serialization' dependencyManagement { imports { - mavenBom "org.jooby:jooby-bom:${joobyVersion}" + mavenBom "io.jooby:jooby-bom:${joobyVersion}" } } @@ -18,9 +18,9 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serializationVersion" compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" - compile "org.jooby:jooby-lang-kotlin" - compile "org.jooby:jooby-jackson" - compile "org.jooby:jooby-pac4j2" + compile "io.jooby:jooby-netty" + compile "io.jooby:jooby-guice" + compile "io.jooby:jooby-jackson" compile "com.fasterxml.jackson.module:jackson-module-kotlin:${jacksonModuleKotlinVersion}" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlinVersion" testCompile project(":kvision-modules:kvision-common-types") diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt index b3da785d..73fcdadb 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVModules.kt @@ -21,14 +21,17 @@ */ package pl.treksoft.kvision.remote -import org.jooby.Kooby -import org.jooby.json.Jackson +import io.jooby.AssetSource +import io.jooby.Kooby +import io.jooby.di.GuiceModule +import io.jooby.json.JacksonModule /** * Initialization function for Jooby server. */ fun Kooby.kvisionInit() { assets("/", "/assets/index.html") - assets("/**", "/assets/{0}").onMissing(0) - use(Jackson()) + assets("/*", AssetSource.create(javaClass.classLoader, "assets")) + install(GuiceModule()) + install(JacksonModule()) } |