Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
a3e62284
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
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,体验更适合开发者的 AI 搜索 >>
提交
a3e62284
编写于
10月 23, 2017
作者:
R
Rossen Stoyanchev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Create Languages section
Issue: SPR-16044
上级
c80aa833
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
958 addition
and
941 deletion
+958
-941
src/docs/asciidoc/core/core-beans.adoc
src/docs/asciidoc/core/core-beans.adoc
+1
-1
src/docs/asciidoc/core/core-null-safety.adoc
src/docs/asciidoc/core/core-null-safety.adoc
+1
-1
src/docs/asciidoc/index.adoc
src/docs/asciidoc/index.adoc
+2
-2
src/docs/asciidoc/integration-appendix.adoc
src/docs/asciidoc/integration-appendix.adoc
+0
-29
src/docs/asciidoc/integration.adoc
src/docs/asciidoc/integration.adoc
+0
-884
src/docs/asciidoc/languages.adoc
src/docs/asciidoc/languages.adoc
+16
-0
src/docs/asciidoc/languages/dynamic-languages.adoc
src/docs/asciidoc/languages/dynamic-languages.adoc
+912
-0
src/docs/asciidoc/languages/groovy.adoc
src/docs/asciidoc/languages/groovy.adoc
+13
-0
src/docs/asciidoc/languages/kotlin.adoc
src/docs/asciidoc/languages/kotlin.adoc
+13
-24
未找到文件。
src/docs/asciidoc/core/core-beans.adoc
浏览文件 @
a3e62284
...
...
@@ -3868,7 +3868,7 @@ Notice how the `InstantiationTracingBeanPostProcessor` is simply defined. It doe
even have a name, and because it is a bean it can be dependency-injected just like any
other bean. (The preceding configuration also defines a bean that is backed by a Groovy
script. The Spring dynamic language support is detailed in the chapter entitled
<<
integration
.adoc#dynamic-language, Dynamic language support>>.)
<<
languages
.adoc#dynamic-language, Dynamic language support>>.)
The following simple Java application executes the preceding code and configuration:
...
...
src/docs/asciidoc/core/core-null-safety.adoc
浏览文件 @
a3e62284
...
...
@@ -40,7 +40,7 @@ at runtime.
They are also used to make Spring API null-safe in Kotlin projects since Kotlin natively
supports https://kotlinlang.org/docs/reference/null-safety.html[null-safety]. More details
are available in <<
kotlin#
null-safety,Kotlin support documentation>>.
are available in <<
languages#kotlin-
null-safety,Kotlin support documentation>>.
== JSR 305 meta-annotations
...
...
src/docs/asciidoc/index.adoc
浏览文件 @
a3e62284
...
...
@@ -22,5 +22,5 @@ ORM, Marshalling XML.
<<web-reactive.adoc#spring-webflux,Web Reactive>> :: Spring WebFlux,
WebClient, WebSocket.
<<integration.adoc#spring-integration,Integration>> :: Remoting, JMS, JCA, JMX, Email,
Tasks, Scheduling, Cache
, Dynamic languages
.
<<
kotlin.adoc#kotlin,Kotlin>> :: Extensions, Bean Definition DSL, WebFlux DSL
.
Tasks, Scheduling, Cache.
<<
languages.adoc#languages,Languages>> :: Kotlin, Groovy, Dynamic languages
.
src/docs/asciidoc/integration-appendix.adoc
浏览文件 @
a3e62284
...
...
@@ -258,35 +258,6 @@ After...
[[xsd-schemas-lang]]
=== The lang schema
The `lang` tags deal with exposing objects that have been written in a dynamic language
such as JRuby or Groovy as beans in the Spring container.
These tags (and the dynamic language support) are comprehensively covered in the chapter
entitled <<integration.adoc#dynamic-language,Dynamic language support>>.
Please do consult that chapter for full details on this support and the `lang` tags themselves.
In the interest of completeness, to use the tags in the `lang` schema, you need to have
the following preamble at the top of your Spring XML configuration file; the text in the
following snippet references the correct schema so that the tags in the `lang` namespace
are available to you.
[source,xml,indent=0]
[subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
__xmlns:lang="http://www.springframework.org/schema/lang"__ xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
__http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd"__> <!-- bean definitions here -->
</beans>
----
[[xsd-schemas-jms]]
=== The jms schema
...
...
src/docs/asciidoc/integration.adoc
浏览文件 @
a3e62284
此差异已折叠。
点击以展开。
src/docs/asciidoc/languages.adoc
0 → 100644
浏览文件 @
a3e62284
[[lanugages]]
= Language Support
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
:toc: left
:toclevels: 4
:docinfo1:
include::languages/kotlin.adoc[leveloffset=+1]
include::languages/groovy.adoc[leveloffset=+1]
include::languages/dynamic-languages.adoc[leveloffset=+1]
src/docs/asciidoc/languages/dynamic-languages.adoc
0 → 100644
浏览文件 @
a3e62284
此差异已折叠。
点击以展开。
src/docs/asciidoc/languages/groovy.adoc
0 → 100644
浏览文件 @
a3e62284
[[groovy]]
= Apache Groovy
Groovy is a powerful, optionally typed and dynamic language, with static-typing and static
compilation capabilities. It offers a concise syntax and integrates smoothly with any
existing Java application.
The Spring Framework provides a dedicated `ApplicationContext` that supports a Groovy-based
Bean Definition DSL. For more details, see
<<core.adoc#groovy-bean-definition-dsl,The Groovy Bean Definition DSL>>.
Further support for Groovy including beans written in Groovy, refreshable script beans,
and more is available in next the section <<dynamic-language>>.
src/docs/asciidoc/kotlin.adoc
→
src/docs/asciidoc/
languages/
kotlin.adoc
浏览文件 @
a3e62284
[[kotlin]]
= Kotlin support
:doc-root: https://docs.spring.io
:api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework
:toc: left
:toclevels: 4
:docinfo1:
[[introduction]]
== Introduction
= Kotlin
https://kotlinlang.org[Kotlin] is a statically-typed language targeting the JVM (and other platforms)
which allows writing concise and elegant code while providing very good
https://kotlinlang.org/docs/reference/java-interop.html[interoperability] with
existing libraries written in Java.
Spring Framework 5 introduces first-class support for Kotlin and
allows developers to write
Spring +
Kotlin applications almost as if the Spring Framework was a native Kotlin framework.
The Spring Framework provides first-class support for Kotlin that
allows developers to write
Kotlin applications almost as if the Spring Framework was a native Kotlin framework.
[[requirements]]
[[
kotlin-
requirements]]
== Requirements
Spring Framework supports Kotlin 1.1+ and requires
...
...
@@ -37,7 +26,7 @@ https://start.spring.io/#!language=kotlin[start.spring.io].
[[extensions]]
[[
kotlin-
extensions]]
== Extensions
Kotlin https://kotlinlang.org/docs/reference/extensions.html[extensions] provide the ability
...
...
@@ -89,7 +78,7 @@ for shorter syntax.
[[null-safety]]
[[
kotlin-
null-safety]]
== Null-safety
One of Kotlin's key features is https://kotlinlang.org/docs/reference/null-safety.html[null-safety]
...
...
@@ -132,7 +121,7 @@ for up-to-date information.
[[classes-interfaces]]
[[
kotlin-
classes-interfaces]]
== Classes & Interfaces
Spring Framework supports various Kotlin constructs like instantiating Kotlin classes
...
...
@@ -156,7 +145,7 @@ As of Spring Boot 2.0, Jackson Kotlin module is automatically provided via the J
[[annotations]]
[[
kotlin-
annotations]]
== Annotations
Spring Framework also takes advantage of https://kotlinlang.org/docs/reference/null-safety.html[Kotlin null-safety]
...
...
@@ -173,7 +162,7 @@ won’t raise an error if such bean does not exist.
[[bean-definition-dsl]]
[[
kotlin-
bean-definition-dsl]]
== Bean definition DSL
Spring Framework 5 introduces a new way to register beans in a functional way using lambdas
...
...
@@ -275,7 +264,7 @@ for more details and up-to-date information.
[[web]]
[[
kotlin-
web]]
== Web
...
...
@@ -357,7 +346,7 @@ project for more details.
[[spring-projects-in-kotlin]]
[[
kotlin-
spring-projects-in-kotlin]]
== Spring projects in Kotlin
This section provides focus on some specific hints and recommendations worth
...
...
@@ -667,7 +656,7 @@ class SpecificationLikeTests {
[[getting-started]]
[[
kotlin-
getting-started]]
== Getting started
...
...
@@ -697,7 +686,7 @@ MVC and its annotation-based programming model is a perfectly valid and fully su
[[resources-started]]
[[
kotlin-
resources-started]]
== Resources
* http://kotlinlang.org/docs/reference/[Kotlin language reference]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录