diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fa276b6..2f5a112 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -3,6 +3,7 @@ on:
push:
pull_request:
branches: [ master ]
+ workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
@@ -130,7 +131,7 @@ jobs:
./gradlew kte-example:test
publish:
needs: [build, test-jte, test-kte, test-thymeleaf-kotlin, test-thymeleaf-java]
- if: github.ref_type == 'tag' || contains(github.ref_name, 'SNAPSHOT')
+ if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: checkout
diff --git a/README.md b/README.md
index 248c5bd..41308fc 100644
--- a/README.md
+++ b/README.md
@@ -227,7 +227,7 @@ spring.view-component.local-development=true
Gradle
```kotlin
-implementation("de.tschuehly:spring-view-component-thymeleaf:0.9.0")
+implementation("de.tschuehly:spring-view-component-thymeleaf:0.9.1")
sourceSets {
main {
resources {
@@ -249,7 +249,7 @@ sourceSets {
de.tschuehly
spring-view-component-thymeleaf
- 0.9.0
+ 0.9.1
@@ -289,7 +289,7 @@ plugins {
id("gg.jte.gradle") version("3.2.1")
}
-implementation("de.tschuehly:spring-view-component-jte:0.9.0")
+implementation("de.tschuehly:spring-view-component-jte:0.9.1")
jte{
generate()
@@ -308,7 +308,7 @@ jte{
de.tschuehly
spring-view-component-jte
- 0.9.0
+ 0.9.1
@@ -352,7 +352,7 @@ plugins {
}
dependencies {
- implementation("de.tschuehly:spring-view-component-kte:0.9.0")
+ implementation("de.tschuehly:spring-view-component-kte:0.9.1")
}
jte {
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index 1a0a779..dd6694b 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -1,10 +1,10 @@
import org.jreleaser.model.Active
plugins {
- id("org.springframework.boot") version "3.5.6"
+ id("org.springframework.boot") version "4.0.3"
id("io.spring.dependency-management") version "1.1.7"
- kotlin("jvm") version "2.2.20"
- kotlin("plugin.spring") version "2.2.20"
+ kotlin("jvm") version "2.2.21"
+ kotlin("plugin.spring") version "2.2.21"
id("maven-publish")
id("org.jreleaser") version "1.20.0"
@@ -13,7 +13,7 @@ plugins {
}
group = "de.tschuehly"
-version = "0.9.0"
+version = "0.9.1"
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
@@ -22,15 +22,16 @@ repositories {
}
dependencies {
- implementation("org.springframework.boot:spring-boot-starter-web")
- implementation("org.springframework.boot:spring-boot-starter-aop")
+ implementation("org.springframework.boot:spring-boot-starter-webmvc")
+ implementation("org.springframework.boot:spring-boot-starter-aspectj")
compileOnly("org.springframework.boot:spring-boot-devtools")
implementation("io.projectreactor:reactor-core")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testFixturesImplementation("org.springframework.boot:spring-boot-starter-test")
- testFixturesImplementation("org.springframework.boot:spring-boot-starter-web")
+ testFixturesImplementation("org.springframework.boot:spring-boot-resttestclient")
+ testFixturesImplementation("org.springframework.boot:spring-boot-starter-webmvc")
testFixturesImplementation("org.springframework.boot:spring-boot-devtools")
}
diff --git a/core/src/main/kotlin/de/tschuehly/spring/viewcomponent/core/IViewContext.kt b/core/src/main/kotlin/de/tschuehly/spring/viewcomponent/core/IViewContext.kt
index 833796e..d6e6d50 100644
--- a/core/src/main/kotlin/de/tschuehly/spring/viewcomponent/core/IViewContext.kt
+++ b/core/src/main/kotlin/de/tschuehly/spring/viewcomponent/core/IViewContext.kt
@@ -1,5 +1,6 @@
package de.tschuehly.spring.viewcomponent.core
+import org.springframework.beans.factory.getBean
import org.springframework.context.ApplicationContext
interface IViewContext {
diff --git a/core/src/testFixtures/kotlin/de/tschuehly/spring/viewcomponent/core/IntegrationTestBase.kt b/core/src/testFixtures/kotlin/de/tschuehly/spring/viewcomponent/core/IntegrationTestBase.kt
index 46e240e..364ec2f 100644
--- a/core/src/testFixtures/kotlin/de/tschuehly/spring/viewcomponent/core/IntegrationTestBase.kt
+++ b/core/src/testFixtures/kotlin/de/tschuehly/spring/viewcomponent/core/IntegrationTestBase.kt
@@ -4,11 +4,13 @@ import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.test.web.client.TestRestTemplate
+import org.springframework.boot.resttestclient.TestRestTemplate
+import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate
import org.springframework.http.HttpMethod
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
+@AutoConfigureTestRestTemplate
abstract class IntegrationTestBase {
@Autowired
lateinit var testRestTemplate: TestRestTemplate
diff --git a/examples/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/wrapper/gradle-wrapper.jar
index d64cd49..8bdaf60 100644
Binary files a/examples/gradle/wrapper/gradle-wrapper.jar and b/examples/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/wrapper/gradle-wrapper.properties
index a80b22c..23449a2 100644
--- a/examples/gradle/wrapper/gradle-wrapper.properties
+++ b/examples/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/examples/gradlew b/examples/gradlew
old mode 100644
new mode 100755
index 1aa94a4..adff685
--- a/examples/gradlew
+++ b/examples/gradlew
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright © 2015-2021 the original authors.
+# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -112,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -170,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -203,15 +203,14 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
-# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
+ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
diff --git a/examples/gradlew.bat b/examples/gradlew.bat
index 25da30d..c4bdd3a 100644
--- a/examples/gradlew.bat
+++ b/examples/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -68,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/examples/jte-example/build.gradle.kts b/examples/jte-example/build.gradle.kts
index 9d670b2..eaee6fa 100644
--- a/examples/jte-example/build.gradle.kts
+++ b/examples/jte-example/build.gradle.kts
@@ -2,7 +2,7 @@ import kotlin.io.path.Path
plugins {
java
- id("org.springframework.boot") version "3.5.6"
+ id("org.springframework.boot") version "4.0.3"
id("io.spring.dependency-management") version "1.1.7"
id("gg.jte.gradle") version("3.2.1")
}
@@ -24,17 +24,18 @@ repositories {
}
dependencies {
- implementation("org.springframework.boot:spring-boot-starter-web")
+ implementation("org.springframework.boot:spring-boot-starter-webmvc")
- implementation("de.tschuehly:spring-view-component-jte:0.9.0")
+ implementation("de.tschuehly:spring-view-component-jte:0.9.1")
implementation("org.webjars.npm:htmx.org:1.9.11")
implementation("org.webjars:webjars-locator-lite:1.1.0")
runtimeOnly("org.springframework.boot:spring-boot-devtools")
-
+ testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
+ testImplementation("org.springframework.boot:spring-boot-restclient")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.springframework.boot:spring-boot-devtools")
- testImplementation(testFixtures("de.tschuehly:spring-view-component-core:0.9.0"))
+ testImplementation(testFixtures("de.tschuehly:spring-view-component-core:0.9.1"))
}
tasks.withType {
diff --git a/examples/jte-example/pom.xml b/examples/jte-example/pom.xml
index 923fb3a..25c663b 100644
--- a/examples/jte-example/pom.xml
+++ b/examples/jte-example/pom.xml
@@ -5,7 +5,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.1.3
+ 4.0.0
de.tschuehly.example
@@ -15,12 +15,12 @@
JTE Example
17
- 0.9.0
+ 0.9.1
org.springframework.boot
- spring-boot-starter-web
+ spring-boot-starter-webmvc
@@ -53,6 +53,16 @@
spring-boot-starter-test
test
+
+ org.springframework.boot
+ spring-boot-starter-webmvc-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-restclient
+ test
+
diff --git a/examples/kte-example/build.gradle.kts b/examples/kte-example/build.gradle.kts
index d8ef684..7defe17 100644
--- a/examples/kte-example/build.gradle.kts
+++ b/examples/kte-example/build.gradle.kts
@@ -3,11 +3,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import kotlin.io.path.Path
plugins {
- id("org.springframework.boot") version "3.5.6"
+ id("org.springframework.boot") version "4.0.3"
id("io.spring.dependency-management") version "1.1.7"
- kotlin("jvm") version "2.2.20"
- kotlin("plugin.spring") version "2.2.20"
- kotlin("kapt") version "2.2.20"
+ kotlin("jvm") version "2.2.21"
+ kotlin("plugin.spring") version "2.2.21"
+ kotlin("kapt") version "2.2.21"
id("gg.jte.gradle") version("3.2.1")
}
@@ -31,23 +31,24 @@ repositories {
}
dependencies {
- implementation("de.tschuehly:spring-view-component-kte:0.9.0")
- implementation("de.tschuehly:spring-view-component-core:0.9.0")
- implementation("io.github.wimdeblauwe:htmx-spring-boot:4.0.1")
+ implementation("de.tschuehly:spring-view-component-kte:0.9.1")
+ implementation("de.tschuehly:spring-view-component-core:0.9.1")
+ implementation("io.github.wimdeblauwe:htmx-spring-boot:5.0.0")
implementation("org.webjars.npm:htmx.org:1.9.11")
implementation("org.webjars:webjars-locator-lite:1.1.0")
implementation("org.springframework.boot:spring-boot-starter")
- implementation("org.springframework.boot:spring-boot-starter-web")
+ implementation("org.springframework.boot:spring-boot-starter-webmvc")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-devtools")
implementation("org.jetbrains.kotlin:kotlin-reflect")
-
+ testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
+ testImplementation("org.springframework.boot:spring-boot-restclient")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-devtools")
- testImplementation(testFixtures("de.tschuehly:spring-view-component-core:0.9.0"))
+ testImplementation(testFixtures("de.tschuehly:spring-view-component-core:0.9.1"))
}
kotlin {
diff --git a/examples/kte-example/src/main/kotlin/de/tschuehly/kteviewcomponentexample/web/layout/LayoutViewComponent.kte b/examples/kte-example/src/main/kotlin/de/tschuehly/kteviewcomponentexample/web/layout/LayoutViewComponent.kte
index 5fa1b58..fe47ff1 100644
--- a/examples/kte-example/src/main/kotlin/de/tschuehly/kteviewcomponentexample/web/layout/LayoutViewComponent.kte
+++ b/examples/kte-example/src/main/kotlin/de/tschuehly/kteviewcomponentexample/web/layout/LayoutViewComponent.kte
@@ -1,4 +1,6 @@
-@param layoutView: de.tschuehly.kteviewcomponentexample.web.layout.LayoutViewComponent.LayoutView
+@import de.tschuehly.kteviewcomponentexample.web.layout.LayoutViewComponent
+
+@param layoutView: de.tschuehly.kteviewcomponentexample.web.layout.LayoutViewComponent.LayoutView