Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
45ecfc6d
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 搜索 >>
提交
45ecfc6d
编写于
9月 21, 2018
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix source code callouts in Reference Manual
上级
59e87f95
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
38 deletion
+49
-38
src/docs/asciidoc/data-access-appendix.adoc
src/docs/asciidoc/data-access-appendix.adoc
+14
-8
src/docs/asciidoc/testing.adoc
src/docs/asciidoc/testing.adoc
+1
-1
src/docs/asciidoc/web/webflux-webclient.adoc
src/docs/asciidoc/web/webflux-webclient.adoc
+8
-7
src/docs/asciidoc/web/webmvc.adoc
src/docs/asciidoc/web/webmvc.adoc
+8
-7
src/docs/asciidoc/web/websocket-intro.adoc
src/docs/asciidoc/web/websocket-intro.adoc
+18
-15
未找到文件。
src/docs/asciidoc/data-access-appendix.adoc
浏览文件 @
45ecfc6d
...
@@ -37,16 +37,19 @@ are available to you:
...
@@ -37,16 +37,19 @@ are available to you:
----
----
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation=" <1>
xmlns:tx="http://www.springframework.org/schema/tx" <1>
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd <2>
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd <2>
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> <!-- bean definitions here -->
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
<!-- bean definitions here -->
</beans>
</beans>
----
----
<1>
Specify the
namespace.
<1>
Declare usage of the `tx`
namespace.
<2> Specify the location (with other schema locations).
<2> Specify the location (with other schema locations).
====
====
...
@@ -77,12 +80,15 @@ the correct schema so that the elements in the `jdbc` namespace are available to
...
@@ -77,12 +80,15 @@ the correct schema so that the elements in the `jdbc` namespace are available to
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation=" <2>
xmlns:jdbc="http://www.springframework.org/schema/jdbc" <1>
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> <!-- bean definitions here --> <2>
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> <2>
<!-- bean definitions here -->
</beans>
</beans>
----
----
<1>
Specify the
namespace.
<1>
Declare usage of the `jdbc`
namespace.
<2> Specify the location (with other schema locations).
<2> Specify the location (with other schema locations).
====
====
src/docs/asciidoc/testing.adoc
浏览文件 @
45ecfc6d
...
@@ -758,7 +758,7 @@ configuration scenarios:
...
@@ -758,7 +758,7 @@ configuration scenarios:
[
source
,
java
,
indent
=
0
]
[
source
,
java
,
indent
=
0
]
[
subs
=
"verbatim,quotes"
]
[
subs
=
"verbatim,quotes"
]
----
----
@
DirtiesContext
@
DirtiesContext
<
1
>
public
class
ContextDirtyingTests
{
public
class
ContextDirtyingTests
{
//
some
tests
that
result
in
the
Spring
container
being
dirtied
//
some
tests
that
result
in
the
Spring
container
being
dirtied
}
}
...
...
src/docs/asciidoc/web/webflux-webclient.adoc
浏览文件 @
45ecfc6d
...
@@ -208,16 +208,17 @@ The following example shows how to customize Jetty `HttpClient` settings:
...
@@ -208,16 +208,17 @@ The following example shows how to customize Jetty `HttpClient` settings:
By default, `HttpClient` creates its own resources (`Executor`, `ByteBufferPool`, `Scheduler`),
By default, `HttpClient` creates its own resources (`Executor`, `ByteBufferPool`, `Scheduler`),
which remain active until the process exits or `stop()` is called.
which remain active until the process exits or `stop()` is called.
You can share resources between multiple instances of the Jetty client (and server) and ensure that the
You can share resources between multiple instances of the Jetty client (and server) and
resources are shut down when the Spring `ApplicationContext` is closed by declaring a
ensure that the resources are shut down when the Spring `ApplicationContext` is closed by
Spring-managed bean of type `JettyResourceFactory`, as the following example shows:
declaring a Spring-managed bean of type `JettyResourceFactory`, as the following example
shows:
====
====
[source,java,intent=0]
[source,java,intent=0]
[subs="verbatim,quotes"]
[subs="verbatim,quotes"]
----
----
@Bean
@Bean
public JettyResourceFactory resourceFactory() {
public JettyResourceFactory resourceFactory() {
<1>
return new JettyResourceFactory();
return new JettyResourceFactory();
}
}
...
@@ -229,13 +230,13 @@ Spring-managed bean of type `JettyResourceFactory`, as the following example sho
...
@@ -229,13 +230,13 @@ Spring-managed bean of type `JettyResourceFactory`, as the following example sho
};
};
ClientHttpConnector connector =
ClientHttpConnector connector =
new JettyClientHttpConnector(resourceFactory(), customizer);
//
<2>
new JettyClientHttpConnector(resourceFactory(), customizer); <2>
return WebClient.builder().clientConnector(connector).build();
//
<3>
return WebClient.builder().clientConnector(connector).build(); <3>
}
}
----
----
<1> Create shared resources.
<1> Create
resource factory for
shared resources.
<2> Use the `JettyClientHttpConnector` constructor with resource factory.
<2> Use the `JettyClientHttpConnector` constructor with resource factory.
<3> Plug the connector into the `WebClient.Builder`.
<3> Plug the connector into the `WebClient.Builder`.
====
====
...
...
src/docs/asciidoc/web/webmvc.adoc
浏览文件 @
45ecfc6d
...
@@ -2359,19 +2359,19 @@ specific controller. This typically lists the names of model attributes or types
...
@@ -2359,19 +2359,19 @@ specific controller. This typically lists the names of model attributes or types
model attributes that should be transparently stored in the session for subsequent
model attributes that should be transparently stored in the session for subsequent
requests to access.
requests to access.
The following example uses
a
`@SessionAttributes` annotation:
The following example uses
the
`@SessionAttributes` annotation:
====
====
[source,java,indent=0]
[source,java,indent=0]
[subs="verbatim,quotes"]
[subs="verbatim,quotes"]
----
----
@Controller
@Controller
@SessionAttributes("pet")
@SessionAttributes("pet")
<
1
>
public class EditPetForm {
public class EditPetForm {
// ...
// ...
}
}
----
----
<
1
>
Using
a
`@SessionAttributes` annotation.
<
1
>
Using
the
`@SessionAttributes` annotation.
====
====
On the first request, when a model attribute with the name, `pet`, is added to the model,
On the first request, when a model attribute with the name, `pet`, is added to the model,
...
@@ -2394,13 +2394,14 @@ storage, as the following example shows:
...
@@ -2394,13 +2394,14 @@ storage, as the following example shows:
if (errors.hasErrors) {
if (errors.hasErrors) {
// ...
// ...
}
}
status.setComplete();
status.setComplete();
<
2
>
// ...
// ...
}
}
}
}
}
}
----
----
<
1
>
Clearing the `Pet` value from storage.
<
1
>
Storing the `Pet` value in the Servlet session.
<
2
>
Clearing the `Pet` value from the Servlet session.
====
====
...
@@ -2449,11 +2450,11 @@ or `HandlerInterceptor`):
...
@@ -2449,11 +2450,11 @@ or `HandlerInterceptor`):
[subs="verbatim,quotes"]
[subs="verbatim,quotes"]
----
----
@GetMapping("/")
@GetMapping("/")
public String handle(@RequestAttribute Client client) {
public String handle(@RequestAttribute Client client) {
<
1
>
// ...
// ...
}
}
----
----
<
1
>
Using
a
`@RequestAttribute` annotation.
<
1
>
Using
the
`@RequestAttribute` annotation.
====
====
...
...
src/docs/asciidoc/web/websocket-intro.adoc
浏览文件 @
45ecfc6d
...
@@ -11,16 +11,17 @@ to upgrade or, in this case, to switch to the WebSocket protocol. The following
...
@@ -11,16 +11,17 @@ to upgrade or, in this case, to switch to the WebSocket protocol. The following
shows such an interaction:
shows such an interaction:
====
====
[subs="quotes"]
[source,yaml,indent=0]
[subs="verbatim,quotes"]
----
----
GET /spring-websocket-portfolio/portfolio HTTP/1.1
GET /spring-websocket-portfolio/portfolio HTTP/1.1
Host: localhost:8080
Host: localhost:8080
Upgrade: websocket <1>
Upgrade: websocket <1>
Connection: Upgrade <2>
Connection: Upgrade <2>
Sec-WebSocket-Key: Uc9l9TMkWGbHFD2qnFHltg==
Sec-WebSocket-Key: Uc9l9TMkWGbHFD2qnFHltg==
Sec-WebSocket-Protocol: v10.stomp, v11.stomp
Sec-WebSocket-Protocol: v10.stomp, v11.stomp
Sec-WebSocket-Version: 13
Sec-WebSocket-Version: 13
Origin: http://localhost:8080
Origin: http://localhost:8080
----
----
<1> The `Upgrade` header.
<1> The `Upgrade` header.
<2> Using the `Upgrade` connection.
<2> Using the `Upgrade` connection.
...
@@ -30,14 +31,16 @@ Instead of the usual 200 status code, a server with WebSocket support returns ou
...
@@ -30,14 +31,16 @@ Instead of the usual 200 status code, a server with WebSocket support returns ou
similar to the following:
similar to the following:
====
====
[subs="quotes"]
[source,yaml,indent=0]
[subs="verbatim,quotes"]
----
----
**HTTP/1.1 101 Switching Protocols**
HTTP/1.1 101 Switching Protocols <1>
Upgrade: websocket
Upgrade: websocket
Connection: Upgrade
Connection: Upgrade
Sec-WebSocket-Accept: 1qVdfYHU9hPOl4JYYNXF623Gzn0=
Sec-WebSocket-Accept: 1qVdfYHU9hPOl4JYYNXF623Gzn0=
Sec-WebSocket-Protocol: v10.stomp
Sec-WebSocket-Protocol: v10.stomp
----
----
<1> Protocol switch
====
====
After a successful handshake, the TCP socket underlying the HTTP upgrade request remains
After a successful handshake, the TCP socket underlying the HTTP upgrade request remains
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录