Merge branch '5.1.x'

This commit is contained in:
Rossen Stoyanchev 2019-08-02 16:33:02 +01:00
commit 63bf1bff23
1 changed files with 19 additions and 17 deletions

View File

@ -16,28 +16,29 @@ a number of Java EE (and related) technologies.
[[remoting]] [[remoting]]
== Remoting and Web Services with Spring == Remoting and Web Services
Spring features integration classes for remoting support with various technologies. Spring provides support for remoting with various technologies.
The remoting support eases the development of remote-enabled services, implemented The remoting support eases the development of remote-enabled services, implemented
by your usual POJOs. Currently, Spring supports the following remoting technologies: via Java interfaces and objects as input and output. Currently, Spring supports the
following remoting technologies:
* *Remote Method Invocation (RMI)*: Through the use of `RmiProxyFactoryBean` and * <<remoting-rmi,Remote Method Invocation (RMI)>>: Through the use of `RmiProxyFactoryBean` and
`RmiServiceExporter`, Spring supports both traditional RMI (with `java.rmi.Remote` `RmiServiceExporter`, Spring supports both traditional RMI (with `java.rmi.Remote`
interfaces and `java.rmi.RemoteException`) and transparent remoting through RMI interfaces and `java.rmi.RemoteException`) and transparent remoting through RMI
invokers (with any Java interface). invokers (with any Java interface).
* *Spring's HTTP invoker*: Spring provides a special remoting strategy that allows * <<remoting-httpinvoker>>: Spring provides a special remoting strategy that allows
for Java serialization though HTTP, supporting any Java interface (as the RMI for Java serialization though HTTP, supporting any Java interface (as the RMI
invoker does). The corresponding support classes are `HttpInvokerProxyFactoryBean` invoker does). The corresponding support classes are `HttpInvokerProxyFactoryBean`
and `HttpInvokerServiceExporter`. and `HttpInvokerServiceExporter`.
* *Hessian*: By using Spring's `HessianProxyFactoryBean` and the * <<remoting-caucho-protocols-hessian>>: By using Spring's `HessianProxyFactoryBean` and the
`HessianServiceExporter`, you can transparently expose your services through the `HessianServiceExporter`, you can transparently expose your services through the
lightweight binary HTTP-based protocol provided by Caucho. lightweight binary HTTP-based protocol provided by Caucho.
* *JAX-WS*: Spring provides remoting support for web services through JAX-WS. * <<remoting-web-services>>: Spring provides remoting support for web services through JAX-WS.
* *JMS*: Remoting via JMS as the underlying protocol is supported through the * <<remoting-jms>>: Remoting via JMS as the underlying protocol is supported through the
`JmsInvokerServiceExporter` and `JmsInvokerProxyFactoryBean` classes in the `JmsInvokerServiceExporter` and `JmsInvokerProxyFactoryBean` classes in the
`spring-jms` module. `spring-jms` module.
* *AMQP*: Remoting via AMQP as the underlying protocol is supported by the * <<remoting-amqp>>: Remoting via AMQP as the underlying protocol is supported by the
separate Spring AMQP project. separate Spring AMQP project.
While discussing the remoting capabilities of Spring, we use the following domain While discussing the remoting capabilities of Spring, we use the following domain
@ -94,7 +95,7 @@ the protocol.
[[remoting-rmi]] [[remoting-rmi]]
=== Exposing Services by Using RMI === RMI
By using Spring's support for RMI, you can transparently expose your services through the By using Spring's support for RMI, you can transparently expose your services through the
RMI infrastructure. After having this set up, you basically have a configuration similar RMI infrastructure. After having this set up, you basically have a configuration similar
@ -200,7 +201,7 @@ and you can find more information about Hessian itself at https://www.caucho.com
[[remoting-caucho-protocols-hessian]] [[remoting-caucho-protocols-hessian]]
==== Wiring up `DispatcherServlet` for Hessian ==== Hessian
Hessian communicates through HTTP and does so by using a custom servlet. By using Spring's Hessian communicates through HTTP and does so by using a custom servlet. By using Spring's
`DispatcherServlet` principles (see <<webmvc.adoc#mvc-servlet>>), we can wire up such a `DispatcherServlet` principles (see <<webmvc.adoc#mvc-servlet>>), we can wire up such a
@ -346,7 +347,7 @@ at https://projects.spring.io/spring-security/.
[[remoting-httpinvoker]] [[remoting-httpinvoker]]
=== Exposing Services by Using HTTP Invokers === Spring HTTP Invoker
As opposed to Hessian, Spring HTTP invokers are both lightweight protocols that use their own slim As opposed to Hessian, Spring HTTP invokers are both lightweight protocols that use their own slim
serialization mechanisms and use the standard Java serialization serialization mechanisms and use the standard Java serialization
@ -464,7 +465,7 @@ The following example shows how to do so:
[[remoting-web-services]] [[remoting-web-services]]
=== Web Services === Java Web Services
Spring provides full support for the standard Java web services APIs: Spring provides full support for the standard Java web services APIs:
@ -682,7 +683,7 @@ accordingly first. Check the JAX-WS documentation for details on those requireme
[[remoting-jms]] [[remoting-jms]]
=== Exposing Services through JMS === JMS
You can also expose services transparently by using JMS as the underlying communication You can also expose services transparently by using JMS as the underlying communication
protocol. The JMS remoting support in the Spring Framework is pretty basic. It sends protocol. The JMS remoting support in the Spring Framework is pretty basic. It sends
@ -842,8 +843,9 @@ The following example defines beans that you can inject into other client-side o
[[remoting-amqp]] [[remoting-amqp]]
=== AMQP === AMQP
See the {doc-spring-amqp}/html/_reference.html#remoting[Spring AMQP Reference Guide's Remoting via AMQP as the underlying protocol is supported in the Spring AMQP project.
'Spring Remoting with AMQP' section] for more information. For further details please visit the {doc-spring-amqp}/html/#remoting[Spring Remoting]
section of the Spring AMQP reference.
[[remoting-autodection-remote-interfaces]] [[remoting-autodection-remote-interfaces]]
[NOTE] [NOTE]
@ -925,7 +927,7 @@ major new features added going forward.
[[rest-resttemplate]] [[rest-resttemplate]]
==== Using `RestTemplate` ==== `RestTemplate`
The `RestTemplate` provides a higher level API over HTTP client libraries. It makes it The `RestTemplate` provides a higher level API over HTTP client libraries. It makes it
easy to invoke REST endpoints in a single line. It exposes the following groups of easy to invoke REST endpoints in a single line. It exposes the following groups of