Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
带水的鱼儿
spring-framework
提交
5420d711
S
spring-framework
项目概览
带水的鱼儿
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5420d711
编写于
6月 08, 2021
作者:
S
Sébastien Deleuze
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish Kotlin reference documentation
上级
6251222a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
10 deletion
+8
-10
src/docs/asciidoc/languages/kotlin.adoc
src/docs/asciidoc/languages/kotlin.adoc
+8
-10
未找到文件。
src/docs/asciidoc/languages/kotlin.adoc
浏览文件 @
5420d711
...
...
@@ -8,15 +8,14 @@ with existing libraries written in Java.
The Spring Framework provides first-class support for Kotlin and lets developers write
Kotlin applications almost as if the Spring Framework was a native Kotlin framework.
Most of the code samples of the reference documentation are
provided in Kotlin in addition to Java.
The easiest way to build a Spring application with Kotlin is to leverage Spring Boot and
its https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-kotlin.html[dedicated Kotlin support].
https://spring.io/guides/tutorials/spring-boot-kotlin/[This comprehensive tutorial]
will teach you how to build Spring Boot applications with Kotlin using https://start.spring.io/#!language=kotlin&type=gradle-project[start.spring.io].
As of Spring Framework 5.2, most of the code samples of the reference documentation are
provided in Kotlin in addition to Java.
Feel free to join the #spring channel of https://slack.kotlinlang.org/[Kotlin Slack]
or ask a question with `spring` and `kotlin` as tags on
https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow] if you need support.
...
...
@@ -24,10 +23,10 @@ https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow] if you n
[[kotlin-requirements]]
== Requirements
Spring Framework supports Kotlin 1.3 and requires
https://
bintray.com/bintray/jcenter/org.jetbrains.kotlin%3A
kotlin-stdlib[`kotlin-stdlib`]
(or one of its variants, such as https://
bintray.com/bintray/jcenter/org.jetbrains.kotlin%3A
kotlin-stdlib-jdk8[`kotlin-stdlib-jdk8`])
and https://
bintray.com/bintray/jcenter/org.jetbrains.kotlin%3A
kotlin-reflect[`kotlin-reflect`]
Spring Framework supports Kotlin 1.3
+
and requires
https://
search.maven.org/artifact/org.jetbrains.kotlin/
kotlin-stdlib[`kotlin-stdlib`]
(or one of its variants, such as https://
search.maven.org/artifact/org.jetbrains.kotlin/
kotlin-stdlib-jdk8[`kotlin-stdlib-jdk8`])
and https://
search.maven.org/artifact/org.jetbrains.kotlin/
kotlin-reflect[`kotlin-reflect`]
to be present on the classpath. They are provided by default if you bootstrap a Kotlin project on
https://start.spring.io/#!language=kotlin&type=gradle-project[start.spring.io].
...
...
@@ -344,7 +343,7 @@ Spring Framework provides a
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/view/script/ScriptTemplateView.html[`ScriptTemplateView`]
which supports https://www.jcp.org/en/jsr/detail?id=223[JSR-223] to render templates by using script engines.
By leveraging `
kotlin-script-runtime` and `scripting-jsr223-embeddable
` dependencies, it
By leveraging `
scripting-jsr223
` dependencies, it
is possible to use such feature to render Kotlin-based templates with
https://github.com/Kotlin/kotlinx.html[kotlinx.html] DSL or Kotlin multiline interpolated `String`.
...
...
@@ -352,8 +351,7 @@ https://github.com/Kotlin/kotlinx.html[kotlinx.html] DSL or Kotlin multiline int
[source,kotlin,indent=0]
----
dependencies {
compile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
runtime("org.jetbrains.kotlin:kotlin-scripting-jsr223-embeddable:${kotlinVersion}")
runtime("org.jetbrains.kotlin:kotlin-scripting-jsr223:${kotlinVersion}")
}
----
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录