Skip to content

Commit 3eb5b82

Browse files
committed
Remove documentation for Kotlin Script Templates
Closes gh-34029
1 parent 5e939cc commit 3eb5b82

File tree

1 file changed

+0
-48
lines changed
  • framework-docs/modules/ROOT/pages/languages/kotlin

1 file changed

+0
-48
lines changed

framework-docs/modules/ROOT/pages/languages/kotlin/web.adoc

-48
Original file line numberDiff line numberDiff line change
@@ -75,54 +75,6 @@ mockMvc.get("/person/{name}", "Lee") {
7575

7676

7777

78-
[[kotlin-script-templates]]
79-
== Kotlin Script Templates
80-
81-
Spring Framework provides a
82-
{spring-framework-api}/web/servlet/view/script/ScriptTemplateView.html[`ScriptTemplateView`]
83-
which supports {JSR}223[JSR-223] to render templates by using script engines.
84-
85-
By leveraging `scripting-jsr223` dependencies, it
86-
is possible to use such feature to render Kotlin-based templates with
87-
{kotlin-github-org}/kotlinx.html[kotlinx.html] DSL or Kotlin multiline interpolated `String`.
88-
89-
`build.gradle.kts`
90-
[source,kotlin,indent=0]
91-
----
92-
dependencies {
93-
runtime("org.jetbrains.kotlin:kotlin-scripting-jsr223:${kotlinVersion}")
94-
}
95-
----
96-
97-
Configuration is usually done with `ScriptTemplateConfigurer` and `ScriptTemplateViewResolver` beans.
98-
99-
`KotlinScriptConfiguration.kt`
100-
[source,kotlin,indent=0]
101-
----
102-
@Configuration
103-
class KotlinScriptConfiguration {
104-
105-
@Bean
106-
fun kotlinScriptConfigurer() = ScriptTemplateConfigurer().apply {
107-
engineName = "kotlin"
108-
setScripts("scripts/render.kts")
109-
renderFunction = "render"
110-
isSharedEngine = false
111-
}
112-
113-
@Bean
114-
fun kotlinScriptViewResolver() = ScriptTemplateViewResolver().apply {
115-
setPrefix("templates/")
116-
setSuffix(".kts")
117-
}
118-
}
119-
----
120-
121-
See the https://github.com/sdeleuze/kotlin-script-templating[kotlin-script-templating] example
122-
project for more details.
123-
124-
125-
12678
[[kotlin-multiplatform-serialization]]
12779
== Kotlin multiplatform serialization
12880

0 commit comments

Comments
 (0)