<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
@ -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`),
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
resources are shut down when the Spring `ApplicationContext` is closed by declaring a
Spring-managed bean of type `JettyResourceFactory`, as the following example shows:
You can share resources between multiple instances of the Jetty client (and server) and
ensure that the resources are shut down when the Spring `ApplicationContext` is closed by
declaring a Spring-managed bean of type `JettyResourceFactory`, as the following example
shows:
====
[source,java,intent=0]
[subs="verbatim,quotes"]
----
@Bean
public JettyResourceFactory resourceFactory() {
public JettyResourceFactory resourceFactory() { <1>
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 =
new JettyClientHttpConnector(resourceFactory(), customizer); // <2>
new JettyClientHttpConnector(resourceFactory(), customizer); <2>
@ -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
requests to access.
The following example uses a `@SessionAttributes` annotation:
The following example uses the `@SessionAttributes` annotation:
====
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Controller
@SessionAttributes("pet")
@SessionAttributes("pet") <1>
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,
@ -2394,13 +2394,14 @@ storage, as the following example shows:
@@ -2394,13 +2394,14 @@ storage, as the following example shows:
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"]
----
@GetMapping("/")
public String handle(@RequestAttribute Client client) {
public String handle(@RequestAttribute Client client) { <1>
@ -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:
====
[subs="quotes"]
[source,yaml,indent=0]
[subs="verbatim,quotes"]
----
GET /spring-websocket-portfolio/portfolio HTTP/1.1
Host: localhost:8080
Upgrade: websocket <1>
Connection: Upgrade <2>
Sec-WebSocket-Key: Uc9l9TMkWGbHFD2qnFHltg==
Sec-WebSocket-Protocol: v10.stomp, v11.stomp
Sec-WebSocket-Version: 13
Origin: http://localhost:8080
GET /spring-websocket-portfolio/portfolio HTTP/1.1
Host: localhost:8080
Upgrade: websocket <1>
Connection: Upgrade <2>
Sec-WebSocket-Key: Uc9l9TMkWGbHFD2qnFHltg==
Sec-WebSocket-Protocol: v10.stomp, v11.stomp
Sec-WebSocket-Version: 13
Origin: http://localhost:8080
----
<1> The `Upgrade` header.
<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