mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-05-05 00:29:29 -05:00
Fix issues with Thymeleaf due to Spring upgrade
This commit is contained in:
@@ -23,9 +23,6 @@ discordWebhookVersion=0.8.4
|
||||
# Spring
|
||||
springVersion=3.1.2
|
||||
|
||||
# Thymeleaf
|
||||
thymeleafVersion=3.1.2.RELEASE
|
||||
|
||||
# Database
|
||||
flywayVersion=9.3.0
|
||||
mikuR2dbcMySqlVersion=0.8.2.RELEASE
|
||||
|
||||
+1
-10
@@ -8,26 +8,17 @@ plugins {
|
||||
// Spring
|
||||
kotlin("plugin.spring")
|
||||
id("org.springframework.boot")
|
||||
//id("io.spring.dependency-management")
|
||||
id("io.spring.dependency-management")
|
||||
|
||||
// Tooling
|
||||
id("com.google.cloud.tools.jib")
|
||||
}
|
||||
|
||||
// Versions -- found in gradle.properties
|
||||
// Thymeleaf
|
||||
val thymeleafVersion: String by properties
|
||||
|
||||
dependencies {
|
||||
api(project(":core"))
|
||||
|
||||
// Spring
|
||||
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
|
||||
|
||||
//Thymeleaf
|
||||
implementation("org.thymeleaf:thymeleaf")
|
||||
implementation("org.thymeleaf:thymeleaf-spring5:$thymeleafVersion")
|
||||
implementation("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
@@ -19,10 +19,11 @@ import org.springframework.web.reactive.config.WebFluxConfigurer
|
||||
import org.springframework.web.reactive.function.server.RouterFunction
|
||||
import org.springframework.web.reactive.function.server.RouterFunctions
|
||||
import org.springframework.web.reactive.function.server.ServerResponse
|
||||
import org.thymeleaf.spring5.ISpringWebFluxTemplateEngine
|
||||
import org.thymeleaf.spring5.SpringWebFluxTemplateEngine
|
||||
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver
|
||||
import org.thymeleaf.spring5.view.reactive.ThymeleafReactiveViewResolver
|
||||
import org.thymeleaf.spring6.ISpringWebFluxTemplateEngine
|
||||
import org.thymeleaf.spring6.SpringWebFluxTemplateEngine
|
||||
import org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver
|
||||
import org.thymeleaf.spring6.view.reactive.ThymeleafReactiveViewResolver
|
||||
|
||||
import org.thymeleaf.templatemode.TemplateMode
|
||||
|
||||
@Configuration
|
||||
@@ -49,6 +50,7 @@ class WebFluxConfig : WebServerFactoryCustomizer<ConfigurableWebServerFactory>,
|
||||
return RouterFunctions.resources("/**", ClassPathResource("static/"))
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
fun thymeleafTemplateResolver(): SpringResourceTemplateResolver {
|
||||
val res = SpringResourceTemplateResolver()
|
||||
|
||||
Reference in New Issue
Block a user