From d0d0be01977ae20331e6305bb0268401047088fa Mon Sep 17 00:00:00 2001 From: nk2 Date: Tue, 22 Aug 2023 13:57:17 +0200 Subject: [PATCH] Fix webflux --- kofu-templating-thymeleaf/build.gradle.kts | 6 ++---- .../org/springframework/fu/kofu/templating/ThymeleafDsl.kt | 2 -- kofu-webflux/build.gradle.kts | 2 ++ .../springframework/fu/kofu/webflux/ThymeleafDslTests.kt | 2 +- .../fu/kofu/webflux/WebFluxServerDslTests.kt | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/kofu-templating-thymeleaf/build.gradle.kts b/kofu-templating-thymeleaf/build.gradle.kts index 391be8a07..d654b59cb 100644 --- a/kofu-templating-thymeleaf/build.gradle.kts +++ b/kofu-templating-thymeleaf/build.gradle.kts @@ -9,14 +9,12 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation(project(":kofu")) - implementation(project(":kofu-webflux")) - implementation(project(":kofu-webmvc")) - implementation(project(":autoconfigure-adapter-web-reactive")) - implementation(project(":autoconfigure-adapter-web-servlet")) implementation(project(":autoconfigure-adapter-thymeleaf")) implementation("org.jetbrains.kotlin:kotlin-reflect") + implementation("org.springframework.boot:spring-boot-starter-thymeleaf") + testImplementation("org.junit.jupiter:junit-jupiter-api") testImplementation("org.springframework:spring-test") testImplementation("io.projectreactor:reactor-test") diff --git a/kofu-templating-thymeleaf/src/main/kotlin/org/springframework/fu/kofu/templating/ThymeleafDsl.kt b/kofu-templating-thymeleaf/src/main/kotlin/org/springframework/fu/kofu/templating/ThymeleafDsl.kt index 98e99b41f..7de90f037 100644 --- a/kofu-templating-thymeleaf/src/main/kotlin/org/springframework/fu/kofu/templating/ThymeleafDsl.kt +++ b/kofu-templating-thymeleaf/src/main/kotlin/org/springframework/fu/kofu/templating/ThymeleafDsl.kt @@ -22,8 +22,6 @@ import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafReactiveWebInit import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafServletWebInitializer import org.springframework.context.support.GenericApplicationContext import org.springframework.fu.kofu.AbstractDsl -import org.springframework.fu.kofu.webflux.WebFluxServerDsl -import org.springframework.fu.kofu.webmvc.WebMvcServerDsl /** * Kofu DSL for Thymeleaf template engine. diff --git a/kofu-webflux/build.gradle.kts b/kofu-webflux/build.gradle.kts index 30cd11024..a2f412e81 100644 --- a/kofu-webflux/build.gradle.kts +++ b/kofu-webflux/build.gradle.kts @@ -34,4 +34,6 @@ dependencies { testImplementation(project(":kofu-templating-mustache")) testImplementation(project(":kofu-templating-thymeleaf")) + + testImplementation("org.springframework.boot:spring-boot-starter-jetty") } diff --git a/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/ThymeleafDslTests.kt b/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/ThymeleafDslTests.kt index 4c731185b..037f16d0f 100644 --- a/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/ThymeleafDslTests.kt +++ b/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/ThymeleafDslTests.kt @@ -29,7 +29,7 @@ import org.springframework.test.web.reactive.server.expectBody class ThymeleafDslTests { @Test - fun `Create and request a Mustache view`() { + fun `Create and request a Thymeleaf view`() { val app = reactiveWebApplication { webFlux { port = 0 diff --git a/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/WebFluxServerDslTests.kt b/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/WebFluxServerDslTests.kt index 7a9c3a904..0c587ae24 100644 --- a/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/WebFluxServerDslTests.kt +++ b/kofu-webflux/src/test/kotlin/org/springframework/fu/kofu/webflux/WebFluxServerDslTests.kt @@ -90,7 +90,7 @@ class WebFluxServerDslTests { webFlux { port = 0 router { - engine = tomcat() + engine = jetty() GET("/foo") { noContent().build() } } }