URL Cleanup
This merges the URL Cleanup PRs along with fixes. Closes gh-22617 gh-22622 gh-22635
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<p>
|
||||
This is the public API documentation for the <a href="http://github.com/SpringSource/spring-framework" target="_top">Spring Framework</a>.
|
||||
This is the public API documentation for the <a href="https://github.com/SpringSource/spring-framework" target="_top">Spring Framework</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -202,7 +202,7 @@ implementation detail actually means.
|
||||
|
||||
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with
|
||||
annotations. The @AspectJ style was introduced by the
|
||||
http://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
|
||||
https://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
|
||||
interprets the same annotations as AspectJ 5, using a library supplied by AspectJ
|
||||
for pointcut parsing and matching. The AOP runtime is still pure Spring AOP, though, and
|
||||
there is no dependency on the AspectJ compiler or weaver.
|
||||
@@ -342,9 +342,9 @@ matches the execution of any method named `transfer`:
|
||||
|
||||
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
|
||||
AspectJ 5 pointcut expression. For a full discussion of AspectJ's pointcut language, see
|
||||
the http://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
|
||||
the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
|
||||
Programming Guide] (and, for extensions, the
|
||||
http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
|
||||
https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
|
||||
Developer's Notebook]) or one of the books on AspectJ (such as _Eclipse AspectJ_, by Colyer
|
||||
et. al., or _AspectJ in Action_, by Ramnivas Laddad).
|
||||
|
||||
@@ -600,7 +600,7 @@ method that takes no parameters, whereas `(..)` matches any number (zero or more
|
||||
The `({asterisk})` pattern matches a method that takes one parameter of any type.
|
||||
`(*,String)` matches a method that takes two parameters. The first can be of any type, while the
|
||||
second must be a `String`. Consult the
|
||||
http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
|
||||
https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
|
||||
Semantics] section of the AspectJ Programming Guide for more information.
|
||||
|
||||
The following examples show some common pointcut expressions:
|
||||
@@ -2022,8 +2022,8 @@ preceding advice for a particular join point:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- this is the object that will be proxied by Spring's AOP infrastructure -->
|
||||
<bean id="personService" class="x.y.service.DefaultPersonService"/>
|
||||
@@ -2346,7 +2346,7 @@ simple method executions (for example, field get or set join points and so on).
|
||||
When you use AspectJ, you have the choice of the AspectJ language syntax (also known as
|
||||
the "`code style`") or the @AspectJ annotation style. Clearly, if you do not use Java
|
||||
5+, the choice has been made for you: Use the code style. If aspects play a large
|
||||
role in your design, and you are able to use the http://www.eclipse.org/ajdt/[AspectJ
|
||||
role in your design, and you are able to use the https://www.eclipse.org/ajdt/[AspectJ
|
||||
Development Tools (AJDT)] plugin for Eclipse, the AspectJ language syntax is the
|
||||
preferred option. It is cleaner and simpler because the language was purposefully
|
||||
designed for writing aspects. If you do not use Eclipse or have only a few aspects
|
||||
@@ -2754,7 +2754,7 @@ using Spring in accordance with the properties of the annotation`". In this cont
|
||||
"`initialization`" refers to newly instantiated objects (for example, objects instantiated
|
||||
with the `new` operator) as well as to `Serializable` objects that are undergoing
|
||||
deserialization (for example, through
|
||||
http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
|
||||
https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
|
||||
|
||||
[NOTE]
|
||||
=====
|
||||
@@ -2775,14 +2775,14 @@ available for use in the body of the constructors, you need to define this on th
|
||||
|
||||
You can find more information about the language semantics of the various pointcut
|
||||
types in AspectJ
|
||||
http://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
|
||||
appendix] of the http://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
|
||||
https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
|
||||
appendix] of the https://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
|
||||
Programming Guide].
|
||||
=====
|
||||
|
||||
For this to work, the annotated types must be woven with the AspectJ weaver. You can
|
||||
either use a build-time Ant or Maven task to do this (see, for example, the
|
||||
http://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
|
||||
https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
|
||||
Environment Guide]) or load-time weaving (see <<aop-aj-ltw>>). The
|
||||
`AnnotationBeanConfigurerAspect` itself needs to be configured by Spring (in order to obtain
|
||||
a reference to the bean factory that is to be used to configure new objects). If you
|
||||
@@ -2997,7 +2997,7 @@ The focus of this section is on configuring and using LTW in the specific contex
|
||||
Spring Framework. This section is not a general introduction to LTW. For full details on
|
||||
the specifics of LTW and configuring LTW with only AspectJ (with Spring not being
|
||||
involved at all), see the
|
||||
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html[LTW section of the AspectJ
|
||||
https://www.eclipse.org/aspectj/doc/released/devguide/ltw.html[LTW section of the AspectJ
|
||||
Development Environment Guide].
|
||||
|
||||
The value that the Spring Framework brings to AspectJ LTW is in enabling much
|
||||
@@ -3079,7 +3079,7 @@ standard AspectJ. The following example shows the `aop.xml` file:
|
||||
[source,xml,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
|
||||
<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "https://www.eclipse.org/aspectj/dtd/aspectj.dtd">
|
||||
<aspectj>
|
||||
|
||||
<weaver>
|
||||
@@ -3112,9 +3112,9 @@ the following example:
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<!-- a service object; we will be profiling its methods -->
|
||||
<bean id="entitlementCalculationService"
|
||||
@@ -3162,7 +3162,7 @@ java -javaagent:C:/projects/foo/lib/global/spring-instrument.jar foo.Main
|
||||
----
|
||||
|
||||
The `-javaagent` is a flag for specifying and enabling
|
||||
http://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html[agents
|
||||
https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html[agents
|
||||
to instrument programs that run on the JVM]. The Spring Framework ships with such an
|
||||
agent, the `InstrumentationSavingAgent`, which is packaged in the
|
||||
`spring-instrument.jar` that was supplied as the value of the `-javaagent` argument in
|
||||
@@ -3241,7 +3241,7 @@ The AspectJ LTW infrastructure is configured by using one or more `META-INF/aop.
|
||||
files that are on the Java classpath (either directly or, more typically, in jar files).
|
||||
|
||||
The structure and contents of this file is detailed in the LTW part of the
|
||||
http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html[AspectJ reference
|
||||
https://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html[AspectJ reference
|
||||
documentation]. Because the `aop.xml` file is 100% AspectJ, we do not describe it further here.
|
||||
|
||||
|
||||
@@ -3305,9 +3305,9 @@ Alternatively, if you prefer XML-based configuration, use the
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:load-time-weaver/>
|
||||
|
||||
@@ -3326,20 +3326,20 @@ The following table summarizes various `LoadTimeWeaver` implementations:
|
||||
|===
|
||||
| Runtime Environment| `LoadTimeWeaver` implementation
|
||||
|
||||
| Running in http://tomcat.apache.org/[Apache Tomcat]
|
||||
| Running in https://tomcat.apache.org/[Apache Tomcat]
|
||||
| `TomcatLoadTimeWeaver`
|
||||
|
||||
| Running in http://glassfish.dev.java.net/[GlassFish] (limited to EAR deployments)
|
||||
| Running in https://glassfish.dev.java.net/[GlassFish] (limited to EAR deployments)
|
||||
| `GlassFishLoadTimeWeaver`
|
||||
|
||||
| Running in Red Hat's http://www.jboss.org/jbossas/[JBoss AS] or http://www.wildfly.org/[WildFly]
|
||||
| Running in Red Hat's https://www.jboss.org/jbossas/[JBoss AS] or https://www.wildfly.org/[WildFly]
|
||||
| `JBossLoadTimeWeaver`
|
||||
|
||||
| Running in IBM's http://www-01.ibm.com/software/webservers/appserv/was/[WebSphere]
|
||||
| Running in IBM's https://www-01.ibm.com/software/webservers/appserv/was/[WebSphere]
|
||||
| `WebSphereLoadTimeWeaver`
|
||||
|
||||
| Running in Oracle's
|
||||
http://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html[WebLogic]
|
||||
https://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html[WebLogic]
|
||||
| `WebLogicLoadTimeWeaver`
|
||||
|
||||
| JVM started with Spring `InstrumentationSavingAgent`
|
||||
@@ -3386,9 +3386,9 @@ element. Again, the following example specifies a `ReflectiveLoadTimeWeaver`:
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:load-time-weaver
|
||||
weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/>
|
||||
@@ -3487,7 +3487,7 @@ Spring Boot applications, you typically control the entire JVM setup in any case
|
||||
[[aop-resources]]
|
||||
== Further Resources
|
||||
|
||||
More information on AspectJ can be found on the http://www.eclipse.org/aspectj[AspectJ website].
|
||||
More information on AspectJ can be found on the https://www.eclipse.org/aspectj[AspectJ website].
|
||||
|
||||
_Eclipse AspectJ_ by Adrian Colyer et. al. (Addison-Wesley, 2005) provides a
|
||||
comprehensive introduction and reference for the AspectJ language.
|
||||
|
||||
@@ -29,8 +29,8 @@ correct schema so that the tags in the `util` namespace are available to you):
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:util="http://www.springframework.org/schema/util"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
@@ -518,8 +518,8 @@ are available to you):
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:aop="http://www.springframework.org/schema/aop"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
@@ -543,8 +543,8 @@ available to you:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:context="http://www.springframework.org/schema/context"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
@@ -637,7 +637,7 @@ as it stands).
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="foo" class="x.y.Foo">
|
||||
<meta key="cacheName" value="foo"/> <1>
|
||||
@@ -955,7 +955,7 @@ in a Spring XML configuration file:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:myns="http://www.mycompany.com/schema/myns"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.mycompany.com/schema/myns http://www.mycompany.com/schema/myns/myns.xsd">
|
||||
|
||||
<!-- as a top-level bean -->
|
||||
@@ -994,7 +994,7 @@ to satisfy a target of the following configuration:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:foo="http://www.foo.com/schema/component"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.foo.com/schema/component http://www.foo.com/schema/component/component.xsd">
|
||||
|
||||
<foo:component id="bionic-family" name="Bionic-1">
|
||||
@@ -1223,7 +1223,7 @@ want to add an additional attribute to the existing bean definition element.
|
||||
|
||||
By way of another example, suppose that you define a bean definition for a
|
||||
service object that (unknown to it) accesses a clustered
|
||||
http://jcp.org/en/jsr/detail?id=107[JCache], and you want to ensure that the
|
||||
https://jcp.org/en/jsr/detail?id=107[JCache], and you want to ensure that the
|
||||
named JCache instance is eagerly started within the surrounding cluster.
|
||||
The following listing shows such a definition:
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ The following example shows the basic structure of XML-based configuration metad
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="..." class="..."> <1> <2>
|
||||
<!-- collaborators and configuration for this bean go here -->
|
||||
@@ -199,7 +199,7 @@ The following example shows the service layer objects `(services.xml)` configura
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<!-- services -->
|
||||
|
||||
@@ -223,7 +223,7 @@ The following example shows the data access objects `daos.xml` file:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="accountDao"
|
||||
class="org.springframework.samples.jpetstore.dao.jpa.JpaAccountDao">
|
||||
@@ -974,7 +974,7 @@ example shows:
|
||||
Keep in mind that, to make this work out of the box, your code must be compiled with the
|
||||
debug flag enabled so that Spring can look up the parameter name from the constructor.
|
||||
If you cannot or do not want to compile your code with the debug flag, you can use the
|
||||
http://download.oracle.com/javase/8/docs/api/java/beans/ConstructorProperties.html[@ConstructorProperties]
|
||||
https://download.oracle.com/javase/8/docs/api/java/beans/ConstructorProperties.html[@ConstructorProperties]
|
||||
JDK annotation to explicitly name your constructor arguments. The sample class would
|
||||
then have to look as follows:
|
||||
|
||||
@@ -1329,7 +1329,7 @@ XML configuration:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"
|
||||
destroy-method="close"
|
||||
@@ -1342,7 +1342,7 @@ XML configuration:
|
||||
----
|
||||
|
||||
The preceding XML is more succinct. However, typos are discovered at runtime rather than
|
||||
design time, unless you use an IDE (such as http://www.jetbrains.com/idea/[IntelliJ
|
||||
design time, unless you use an IDE (such as https://www.jetbrains.com/idea/[IntelliJ
|
||||
IDEA] or the https://spring.io/tools/sts[Spring Tool Suite])
|
||||
that supports automatic property completion when you create bean definitions. Such IDE
|
||||
assistance is highly recommended.
|
||||
@@ -1754,7 +1754,7 @@ standard XML format and the second uses the p-namespace) that resolve to the sam
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean name="classic" class="com.example.ExampleBean">
|
||||
<property name="email" value="someone@somewhere.com"/>
|
||||
@@ -1780,7 +1780,7 @@ another bean:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean name="john-classic" class="com.example.Person">
|
||||
<property name="name" value="John Doe"/>
|
||||
@@ -1830,7 +1830,7 @@ The following example uses the `c:` namespace to do the same thing as the from
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:c="http://www.springframework.org/schema/c"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="beanTwo" class="x.y.ThingTwo"/>
|
||||
<bean id="beanThree" class="x.y.ThingThree"/>
|
||||
@@ -2781,9 +2781,9 @@ understand the "`why`" as well as the "`how`" behind it:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- an HTTP Session-scoped bean exposed as a proxy -->
|
||||
<bean id="userPreferences" class="com.something.UserPreferences" scope="session">
|
||||
@@ -3022,9 +3022,9 @@ of the scope. You can also do the `Scope` registration declaratively, by using t
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
|
||||
<property name="scopes">
|
||||
@@ -3882,9 +3882,9 @@ The following `beans` element uses the `InstantiationTracingBeanPostProcessor`:
|
||||
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
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/lang
|
||||
http://www.springframework.org/schema/lang/spring-lang.xsd">
|
||||
https://www.springframework.org/schema/lang/spring-lang.xsd">
|
||||
|
||||
<lang:groovy id="messenger"
|
||||
script-source="classpath:org/springframework/scripting/groovy/Messenger.groovy">
|
||||
@@ -4246,9 +4246,9 @@ configuration (notice the inclusion of the `context` namespace):
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -4649,9 +4649,9 @@ The corresponding bean definitions follow:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -4726,9 +4726,9 @@ The following example shows corresponding bean definitions.
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -4867,9 +4867,9 @@ demonstrates both approaches:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -5012,9 +5012,9 @@ the following example:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:annotation-config/>
|
||||
|
||||
@@ -5463,9 +5463,9 @@ The following alternative uses XML:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:component-scan base-package="org.example"/>
|
||||
|
||||
@@ -5483,7 +5483,7 @@ entries in the classpath. When you build JARs with Ant, make sure that you do no
|
||||
activate the files-only switch of the JAR task. Also, classpath directories may not be
|
||||
exposed based on security policies in some environments -- for example, standalone apps on
|
||||
JDK 1.7.0_45 and higher (which requires 'Trusted-Library' setup in your manifests -- see
|
||||
http://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources).
|
||||
https://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources).
|
||||
|
||||
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
|
||||
However, make sure that your component classes are exported in your `module-info`
|
||||
@@ -6008,7 +6008,7 @@ annotations. To use them, you need to have the relevant jars in your classpath.
|
||||
=====
|
||||
If you use Maven, the `javax.inject` artifact is available in the standard Maven
|
||||
repository (
|
||||
http://repo1.maven.org/maven2/javax/inject/javax.inject/1/[http://repo1.maven.org/maven2/javax/inject/javax.inject/1/]).
|
||||
https://repo1.maven.org/maven2/javax/inject/javax.inject/1/[https://repo1.maven.org/maven2/javax/inject/javax.inject/1/]).
|
||||
You can add the following dependency to your file pom.xml:
|
||||
|
||||
[source,xml,indent=0]
|
||||
@@ -6224,7 +6224,7 @@ features are not available, as the following table shows:
|
||||
consistent with Spring's general defaults, a JSR-330 bean declared in the Spring
|
||||
container is a `singleton` by default. In order to use a scope other than `singleton`,
|
||||
you should use Spring's `@Scope` annotation. `javax.inject` also provides a
|
||||
http://download.oracle.com/javaee/6/api/javax/inject/Scope.html[@Scope] annotation.
|
||||
https://download.oracle.com/javaee/6/api/javax/inject/Scope.html[@Scope] annotation.
|
||||
Nevertheless, this one is only intended to be used for creating your own annotations.
|
||||
|
||||
| @Qualifier
|
||||
@@ -8593,9 +8593,9 @@ notify appropriate parties.
|
||||
NOTE: Spring's eventing mechanism is designed for simple communication between Spring beans
|
||||
within the same application context. However, for more sophisticated enterprise
|
||||
integration needs, the separately maintained
|
||||
http://projects.spring.io/spring-integration/[Spring Integration] project provides
|
||||
https://projects.spring.io/spring-integration/[Spring Integration] project provides
|
||||
complete support for building lightweight,
|
||||
http://www.enterpriseintegrationpatterns.com[pattern-oriented], event-driven
|
||||
https://www.enterpriseintegrationpatterns.com[pattern-oriented], event-driven
|
||||
architectures that build upon the well-known Spring programming model.
|
||||
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ prefixes:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
Resource template = ctx.getResource("http://myhost.com/resource/path/myTemplate.txt");
|
||||
Resource template = ctx.getResource("https://myhost.com/resource/path/myTemplate.txt");
|
||||
----
|
||||
|
||||
The following table summarizes the strategy for converting `String` objects to `Resource` objects:
|
||||
@@ -297,7 +297,7 @@ The following table summarizes the strategy for converting `String` objects to `
|
||||
| Loaded as a `URL` from the filesystem. See also <<resources-filesystemresource-caveats>>.
|
||||
|
||||
| http:
|
||||
| `http://myserver/logo.png`
|
||||
| `https://myserver/logo.png`
|
||||
| Loaded as a `URL`.
|
||||
|
||||
| (none)
|
||||
@@ -614,7 +614,7 @@ entries in the classpath. When you build JARs with Ant, do not activate the file
|
||||
switch of the JAR task. Also, classpath directories may not get exposed based on security
|
||||
policies in some environments -- for example, stand-alone applications on JDK 1.7.0_45
|
||||
and higher (which requires 'Trusted-Library' to be set up in your manifests. See
|
||||
http://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources).
|
||||
https://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources).
|
||||
|
||||
On JDK 9's module path (Jigsaw), Spring's classpath scanning generally works as expected.
|
||||
Putting resources into a dedicated directory is highly recommendable here as well,
|
||||
|
||||
@@ -201,7 +201,7 @@ A JavaBean is a class with a default no-argument constructor and that follows
|
||||
a naming convention where (for example) a property named `bingoMadness` would
|
||||
have a setter method `setBingoMadness(..)` and a getter method `getBingoMadness()`. For
|
||||
more information about JavaBeans and the specification, see
|
||||
http://docs.oracle.com/javase/8/docs/api/java/beans/package-summary.html[javabeans].
|
||||
https://docs.oracle.com/javase/8/docs/api/java/beans/package-summary.html[javabeans].
|
||||
|
||||
One quite important class in the beans package is the `BeanWrapper` interface and its
|
||||
corresponding implementation (`BeanWrapperImpl`). As quoted from the javadoc, the
|
||||
@@ -455,7 +455,7 @@ com
|
||||
|
||||
Note that you can also use the standard `BeanInfo` JavaBeans mechanism here as well
|
||||
(described to some extent
|
||||
http://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html[
|
||||
https://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html[
|
||||
here]). The following example use the `BeanInfo` mechanism to
|
||||
explicitly register one or more `PropertyEditor` instances with the properties of an
|
||||
associated class:
|
||||
@@ -1371,7 +1371,7 @@ Time):
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd>
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd>
|
||||
|
||||
<bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
|
||||
<property name="registerDefaultFormatters" value="false" />
|
||||
@@ -1459,7 +1459,7 @@ following example shows:
|
||||
When a JSR-303 Validator validates an instance of this class, these constraints
|
||||
are enforced.
|
||||
|
||||
For general information on JSR-303 and JSR-349, see the http://beanvalidation.org/[Bean
|
||||
For general information on JSR-303 and JSR-349, see the https://beanvalidation.org/[Bean
|
||||
Validation website]. For information on the specific capabilities of the default
|
||||
reference implementation, see the https://www.hibernate.org/412.html[Hibernate
|
||||
Validator] documentation. To learn how to set up a bean validation provider as a Spring
|
||||
|
||||
@@ -41,9 +41,9 @@ are available to you:
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
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/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">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd <2>
|
||||
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- bean definitions here -->
|
||||
|
||||
@@ -80,8 +80,8 @@ the correct schema so that the elements in the `jdbc` namespace are available to
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> <2>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> <2>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ Typically, you need an application server's JTA capability only if your applicat
|
||||
to handle transactions across multiple resources, which is not a requirement for many
|
||||
applications. Many high-end applications use a single, highly scalable database (such as
|
||||
Oracle RAC) instead. Stand-alone transaction managers (such as
|
||||
http://www.atomikos.com/[Atomikos Transactions] and http://jotm.objectweb.org/[JOTM])
|
||||
https://www.atomikos.com/[Atomikos Transactions] and http://jotm.objectweb.org/[JOTM])
|
||||
are other options. Of course, you may need other application server capabilities, such as
|
||||
Java Message Service (JMS) and Java EE Connector Architecture (JCA).
|
||||
|
||||
@@ -285,9 +285,9 @@ and JNDI lookup version would look like:
|
||||
xmlns:jee="http://www.springframework.org/schema/jee"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/jee
|
||||
http://www.springframework.org/schema/jee/spring-jee.xsd">
|
||||
https://www.springframework.org/schema/jee/spring-jee.xsd">
|
||||
|
||||
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/jpetstore"/>
|
||||
|
||||
@@ -602,11 +602,11 @@ configuration is explained in detail in the next few paragraphs:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- this is the service object that we want to make transactional -->
|
||||
<bean id="fooService" class="x.y.service.DefaultFooService"/>
|
||||
@@ -862,11 +862,11 @@ the default transactional configuration, you could write the following:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<aop:config>
|
||||
|
||||
@@ -910,11 +910,11 @@ transactional settings:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<aop:config>
|
||||
|
||||
@@ -1077,11 +1077,11 @@ In XML configuration, the `<tx:annotation-driven/>` tag provides similar conveni
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- this is the service object that we want to make transactional -->
|
||||
<bean id="fooService" class="x.y.service.DefaultFooService"/>
|
||||
@@ -1535,11 +1535,11 @@ transactional aspects applied to it in the desired order:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<bean id="fooService" class="x.y.service.DefaultFooService"/>
|
||||
|
||||
@@ -1590,11 +1590,11 @@ declarative approach:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<bean id="fooService" class="x.y.service.DefaultFooService"/>
|
||||
|
||||
@@ -1686,7 +1686,7 @@ regardless of visibility.
|
||||
|
||||
To weave your applications with the `AnnotationTransactionAspect`, you must either build
|
||||
your application with AspectJ (see the
|
||||
http://www.eclipse.org/aspectj/doc/released/devguide/index.html[AspectJ Development
|
||||
https://www.eclipse.org/aspectj/doc/released/devguide/index.html[AspectJ Development
|
||||
Guide]) or use load-time weaving. See <<core.adoc#aop-aj-ltw,Load-time weaving with
|
||||
AspectJ in the Spring Framework>> for a discussion of load-time weaving with AspectJ.
|
||||
|
||||
@@ -2004,12 +2004,12 @@ treats them as errors.
|
||||
|
||||
For more information about the Spring Framework's transaction support, see:
|
||||
|
||||
* http://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html[Distributed
|
||||
* https://www.javaworld.com/javaworld/jw-01-2009/jw-01-spring-transactions.html[Distributed
|
||||
transactions in Spring, with and without XA] is a JavaWorld presentation in which
|
||||
Spring's David Syer guides you through seven patterns for distributed
|
||||
transactions in Spring applications, three of them with XA and four without.
|
||||
* http://www.infoq.com/minibooks/JTDS[_Java Transaction Design Strategies_] is a book
|
||||
available from http://www.infoq.com/[InfoQ] that provides a well-paced introduction
|
||||
* https://www.infoq.com/minibooks/JTDS[_Java Transaction Design Strategies_] is a book
|
||||
available from https://www.infoq.com/[InfoQ] that provides a well-paced introduction
|
||||
to transactions in Java. It also includes side-by-side examples of how to configure
|
||||
and use transactions with both the Spring Framework and EJB3.
|
||||
|
||||
@@ -2523,9 +2523,9 @@ The following example shows the corresponding XML configuration:
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<bean id="corporateEventDao" class="com.example.JdbcCorporateEventDao">
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
@@ -2580,9 +2580,9 @@ The following example shows the corresponding XML configuration:
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<!-- Scans within the base package of the application for @Component classes to configure as beans -->
|
||||
<context:component-scan base-package="org.springframework.docs.test" />
|
||||
@@ -2684,7 +2684,7 @@ are the parameter names and the values are the parameter values.
|
||||
|
||||
Another `SqlParameterSource` implementation is the `BeanPropertySqlParameterSource`
|
||||
class. This class wraps an arbitrary JavaBean (that is, an instance of a class that
|
||||
adheres to http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html[the
|
||||
adheres to https://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html[the
|
||||
JavaBean conventions]) and uses the properties of the wrapped JavaBean as the source
|
||||
of named parameter values.
|
||||
|
||||
@@ -4559,7 +4559,7 @@ it with values from the Java `ARRAY`, as the following example shows:
|
||||
|
||||
The `org.springframework.jdbc.datasource.embedded` package provides support for embedded
|
||||
Java database engines. Support for http://www.hsqldb.org[HSQL],
|
||||
http://www.h2database.com[H2], and http://db.apache.org/derby[Derby] is provided
|
||||
https://www.h2database.com[H2], and https://db.apache.org/derby[Derby] is provided
|
||||
natively. You can also use an extensible API to plug in new embedded database types and
|
||||
`DataSource` implementations.
|
||||
|
||||
@@ -4985,7 +4985,7 @@ The benefits of using the Spring Framework to create your ORM DAOs include:
|
||||
|
||||
TIP: For more comprehensive ORM support, including support for alternative database
|
||||
technologies such as MongoDB, you might want to check out the
|
||||
http://projects.spring.io/spring-data/[Spring Data] suite of projects. If you are
|
||||
https://projects.spring.io/spring-data/[Spring Data] suite of projects. If you are
|
||||
a JPA user, the https://spring.io/guides/gs/accessing-data-jpa/[Getting Started Accessing
|
||||
Data with JPA] guide from https://spring.io provides a great introduction.
|
||||
|
||||
@@ -5093,7 +5093,7 @@ exception hierarchies.
|
||||
[[orm-hibernate]]
|
||||
=== Hibernate
|
||||
|
||||
We start with a coverage of http://www.hibernate.org/[Hibernate 5] in a Spring
|
||||
We start with a coverage of https://hibernate.org/[Hibernate 5] in a Spring
|
||||
environment, using it to demonstrate the approach that Spring takes towards integrating
|
||||
OR mappers. This section covers many issues in detail and shows different variations
|
||||
of DAO implementations and transaction demarcation. Most of these patterns can be
|
||||
@@ -5313,11 +5313,11 @@ processing at runtime. The following example shows how to do so:
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
https://www.springframework.org/schema/tx/spring-tx.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
https://www.springframework.org/schema/aop/spring-aop.xsd">
|
||||
|
||||
<!-- SessionFactory, DataSource, etc. omitted -->
|
||||
|
||||
@@ -5558,7 +5558,7 @@ following events occur when a JTA transaction commits:
|
||||
|
||||
The Spring JPA, available under the `org.springframework.orm.jpa` package, offers
|
||||
comprehensive support for the
|
||||
http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html[Java Persistence
|
||||
https://www.oracle.com/technetwork/articles/javaee/jpa-137156.html[Java Persistence
|
||||
API] in a manner similar to the integration with Hibernate while being aware of
|
||||
the underlying implementation in order to provide additional features.
|
||||
|
||||
@@ -5722,7 +5722,7 @@ The `LoadTimeWeaver` interface is a Spring-provided class that lets JPA
|
||||
`ClassTransformer` instances be plugged in a specific manner, depending on whether the
|
||||
environment is a web container or application server. Hooking `ClassTransformers`
|
||||
through an
|
||||
http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html[agent]
|
||||
https://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html[agent]
|
||||
is typically not efficient. The agents work against the entire virtual machine and
|
||||
inspect every class that is loaded, which is usually undesirable in a production
|
||||
server environment.
|
||||
@@ -6396,8 +6396,8 @@ preamble of the XML configuration file. The following example shows how to do so
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:oxm="http://www.springframework.org/schema/oxm" <1>
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd"> <2>
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/oxm https://www.springframework.org/schema/oxm/spring-oxm.xsd"> <2>
|
||||
----
|
||||
<1> Reference the `oxm` schema.
|
||||
<2> Specify the `oxm` schema location.
|
||||
@@ -6577,7 +6577,7 @@ The following table describes the available attributes:
|
||||
XStream is a simple library to serialize objects to XML and back again. It does not
|
||||
require any mapping and generates clean XML.
|
||||
|
||||
For more information on XStream, see the http://x-stream.github.io/[XStream
|
||||
For more information on XStream, see the https://x-stream.github.io/[XStream
|
||||
web site]. The Spring integration classes reside in the
|
||||
`org.springframework.oxm.xstream` package.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActiveLayerIndex</key>
|
||||
|
||||
@@ -27,8 +27,8 @@ correct schema so that the elements in the `jee` namespace are available to you:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:jee="http://www.springframework.org/schema/jee"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/jee https://www.springframework.org/schema/jee/spring-jee.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
@@ -300,8 +300,8 @@ are available to you:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:jms="http://www.springframework.org/schema/jms"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/jms https://www.springframework.org/schema/jms/spring-jms.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
@@ -336,8 +336,8 @@ the correct schema so that the elements in the `cache` namespace are available t
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
__xmlns:cache="http://www.springframework.org/schema/cache"__ xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/cache https://www.springframework.org/schema/cache/spring-cache.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
</beans>
|
||||
|
||||
@@ -195,7 +195,7 @@ transparently creates an invoker and remotely enables the account service throug
|
||||
=== Using Hessian to Remotely Call Services through HTTP
|
||||
|
||||
Hessian offers a binary HTTP-based remoting protocol. It is developed by Caucho,
|
||||
and you can find more information about Hessian itself at http://www.caucho.com[].
|
||||
and you can find more information about Hessian itself at https://www.caucho.com/[].
|
||||
|
||||
|
||||
[[remoting-caucho-protocols-hessian]]
|
||||
@@ -256,7 +256,7 @@ Now we are ready to link in the service at the client. No explicit handler mappi
|
||||
specified (to map request URLs onto services), so we use `BeanNameUrlHandlerMapping`
|
||||
used. Hence, the service is exported at the URL indicated through its bean name
|
||||
within the containing `DispatcherServlet` instance's mapping (as defined earlier):
|
||||
`http://HOST:8080/remoting/AccountService`.
|
||||
`https://HOST:8080/remoting/AccountService`.
|
||||
|
||||
Alternatively, you can create a `HessianServiceExporter` in your root application context (for example,
|
||||
in `WEB-INF/applicationContext.xml`), as the following example shows:
|
||||
@@ -306,7 +306,7 @@ the `AccountService` to manage accounts, as the following example shows:
|
||||
</bean>
|
||||
|
||||
<bean id="accountService" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
|
||||
<property name="serviceUrl" value="http://remotehost:8080/remoting/AccountService"/>
|
||||
<property name="serviceUrl" value="https://remotehost:8080/remoting/AccountService"/>
|
||||
<property name="serviceInterface" value="example.AccountService"/>
|
||||
</bean>
|
||||
----
|
||||
@@ -340,7 +340,7 @@ this application context.
|
||||
|
||||
NOTE: The preceding example does not show a flexible kind of security infrastructure. For
|
||||
more options as far as security is concerned, have a look at the Spring Security project
|
||||
at http://projects.spring.io/spring-security/.
|
||||
at https://projects.spring.io/spring-security/.
|
||||
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ you choose a remoting technology).
|
||||
Under the hood, Spring uses either the standard facilities provided by the JDK or
|
||||
Apache `HttpComponents` to perform HTTP calls. If you need more
|
||||
advanced and easier-to-use functionality, use the latter. See
|
||||
http://hc.apache.org/httpcomponents-client-ga/[hc.apache.org/httpcomponents-client-ga/]
|
||||
https://hc.apache.org/httpcomponents-client-ga/[hc.apache.org/httpcomponents-client-ga/]
|
||||
for more information.
|
||||
|
||||
[WARNING]
|
||||
@@ -372,7 +372,7 @@ If you are concerned about security vulnerabilities due to Java serialization,
|
||||
consider the general-purpose serialization filter mechanism at the core JVM level,
|
||||
originally developed for JDK 9 but backported to JDK 8, 7 and 6 in the meantime. See
|
||||
https://blogs.oracle.com/java-platform-group/entry/incoming_filter_serialization_data_a
|
||||
and http://openjdk.java.net/jeps/290.
|
||||
and https://openjdk.java.net/jeps/290.
|
||||
====
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ shows how to configure this arrangement:
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
|
||||
<property name="serviceUrl" value="http://remotehost:8080/remoting/AccountService"/>
|
||||
<property name="serviceUrl" value="https://remotehost:8080/remoting/AccountService"/>
|
||||
<property name="serviceInterface" value="example.AccountService"/>
|
||||
</bean>
|
||||
----
|
||||
@@ -626,7 +626,7 @@ In the following example, we use `JaxWsPortProxyFactoryBean` to create a proxy f
|
||||
<bean id="accountWebService" class="org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean">
|
||||
<property name="serviceInterface" value="example.AccountService"/> <1>
|
||||
<property name="wsdlDocumentUrl" value="http://localhost:8888/AccountServiceEndpoint?WSDL"/>
|
||||
<property name="namespaceUri" value="http://example/"/>
|
||||
<property name="namespaceUri" value="https://example/"/>
|
||||
<property name="serviceName" value="AccountService"/>
|
||||
<property name="portName" value="AccountServiceEndpointPort"/>
|
||||
</bean>
|
||||
@@ -728,7 +728,7 @@ on both the client and the server:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
|
||||
<property name="brokerURL" value="tcp://ep-t43:61616"/>
|
||||
@@ -755,7 +755,7 @@ On the server, you need to expose the service object that uses the
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="checkingAccountService"
|
||||
class="org.springframework.jms.remoting.JmsInvokerServiceExporter">
|
||||
@@ -807,7 +807,7 @@ The following example defines beans that you can inject into other client-side o
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="checkingAccountService"
|
||||
class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean">
|
||||
@@ -1020,7 +1020,7 @@ The following example uses a `String` variable argument:
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
String result = restTemplate.getForObject(
|
||||
"http://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21");
|
||||
"https://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21");
|
||||
----
|
||||
|
||||
The following example uses a `Map<String, String>`:
|
||||
@@ -1031,7 +1031,7 @@ The following example uses a `Map<String, String>`:
|
||||
Map<String, String> vars = Collections.singletonMap("hotel", "42");
|
||||
|
||||
String result = restTemplate.getForObject(
|
||||
"http://example.com/hotels/{hotel}/rooms/{hotel}", String.class, vars);
|
||||
"https://example.com/hotels/{hotel}/rooms/{hotel}", String.class, vars);
|
||||
----
|
||||
|
||||
Keep in mind URI templates are automatically encoded, as the following example shows:
|
||||
@@ -1039,9 +1039,9 @@ Keep in mind URI templates are automatically encoded, as the following example s
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
restTemplate.getForObject("http://example.com/hotel list", String.class);
|
||||
restTemplate.getForObject("https://example.com/hotel list", String.class);
|
||||
|
||||
// Results in request to "http://example.com/hotel%20list"
|
||||
// Results in request to "https://example.com/hotel%20list"
|
||||
----
|
||||
|
||||
You can use the `uriTemplateHandler` property of `RestTemplate` to customize how URIs
|
||||
@@ -1058,7 +1058,7 @@ You can use the `exchange()` methods to specify request headers, as the followin
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
String uriTemplate = "http://example.com/hotels/{hotel}";
|
||||
String uriTemplate = "https://example.com/hotels/{hotel}";
|
||||
URI uri = UriComponentsBuilder.fromUriString(uriTemplate).build(42);
|
||||
|
||||
RequestEntity<Void> requestEntity = RequestEntity.get(uri)
|
||||
@@ -1083,7 +1083,7 @@ content with the help of an `HttpMessageConverter`.
|
||||
On a POST, an input object is serialized to the request body, as the following example shows:
|
||||
|
||||
----
|
||||
URI location = template.postForLocation("http://example.com/people", person);
|
||||
URI location = template.postForLocation("https://example.com/people", person);
|
||||
----
|
||||
|
||||
You need not explicitly set the Content-Type header of the request. In most cases,
|
||||
@@ -1095,7 +1095,7 @@ turn, influences what message converter is selected.
|
||||
On a GET, the body of the response is deserialized to an output `Object`, as the following example shows:
|
||||
|
||||
----
|
||||
Person person = restTemplate.getForObject("http://example.com/people/{id}", Person.class, 42);
|
||||
Person person = restTemplate.getForObject("https://example.com/people/{id}", Person.class, 42);
|
||||
----
|
||||
|
||||
The `Accept` header of the request does not need to be explicitly set. In most cases,
|
||||
@@ -1189,7 +1189,7 @@ and writes the media type supported by the Java I/O API.
|
||||
[[rest-template-jsonview]]
|
||||
===== Jackson JSON Views
|
||||
|
||||
You can specify a http://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON View]
|
||||
You can specify a https://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON View]
|
||||
to serialize only a subset of the object properties, as the following example shows:
|
||||
|
||||
[source,java,indent=0]
|
||||
@@ -1199,7 +1199,7 @@ to serialize only a subset of the object properties, as the following example sh
|
||||
value.setSerializationView(User.WithoutPasswordView.class);
|
||||
|
||||
RequestEntity<MappingJacksonValue> requestEntity =
|
||||
RequestEntity.post(new URI("http://example.com/user")).body(value);
|
||||
RequestEntity.post(new URI("https://example.com/user")).body(value);
|
||||
|
||||
ResponseEntity<String> response = template.exchange(requestEntity, String.class);
|
||||
----
|
||||
@@ -1235,7 +1235,7 @@ Once the `MultiValueMap` is ready, you can pass it to the `RestTemplate`, as the
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
MultipartBodyBuilder builder = ...;
|
||||
template.postForObject("http://example.com/upload", builder.build(), Void.class);
|
||||
template.postForObject("https://example.com/upload", builder.build(), Void.class);
|
||||
----
|
||||
|
||||
If the `MultiValueMap` contains at least one non-`String` value, which could also be
|
||||
@@ -2673,8 +2673,8 @@ namespace elements, you need to reference the JMS schema, as the following examp
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:jms="http://www.springframework.org/schema/jms" <1>
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/jms https://www.springframework.org/schema/jms/spring-jms.xsd">
|
||||
|
||||
<!-- bean definitions here -->
|
||||
|
||||
@@ -4377,11 +4377,11 @@ you can accept the coupling to both Spring and JMX, then do so.
|
||||
|
||||
This section contains links to further resources about JMX:
|
||||
|
||||
* The http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html[JMX
|
||||
* The https://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html[JMX
|
||||
homepage] at Oracle.
|
||||
* The http://jcp.org/aboutJava/communityprocess/final/jsr003/index3.html[JMX
|
||||
* The https://jcp.org/aboutJava/communityprocess/final/jsr003/index3.html[JMX
|
||||
specification] (JSR-000003).
|
||||
* The http://jcp.org/aboutJava/communityprocess/final/jsr160/index.html[JMX Remote API
|
||||
* The https://jcp.org/aboutJava/communityprocess/final/jsr160/index.html[JMX Remote API
|
||||
specification] (JSR-000160).
|
||||
* The http://mx4j.sourceforge.net/[MX4J homepage]. (MX4J is an open-source implementation of
|
||||
various JMX specs.)
|
||||
@@ -5855,7 +5855,7 @@ implementations behind the common interfaces abstracts away the differences betw
|
||||
SE 5, Java SE 6, and Java EE environments.
|
||||
|
||||
Spring also features integration classes to support scheduling with the `Timer`
|
||||
(part of the JDK since 1.3) and the Quartz Scheduler ( http://quartz-scheduler.org[]).
|
||||
(part of the JDK since 1.3) and the Quartz Scheduler ( https://www.quartz-scheduler.org/[]).
|
||||
You can set up both of those schedulers by using a `FactoryBean` with optional references to
|
||||
`Timer` or `Trigger` instances, respectively. Furthermore, a convenience class for both
|
||||
the Quartz Scheduler and the `Timer` is available that lets you invoke a method of
|
||||
@@ -6557,7 +6557,7 @@ The following example shows these other options:
|
||||
|
||||
Quartz uses `Trigger`, `Job`, and `JobDetail` objects to realize scheduling of all kinds
|
||||
of jobs. For the basic concepts behind Quartz, see
|
||||
http://quartz-scheduler.org[]. For convenience purposes, Spring offers a couple of
|
||||
https://www.quartz-scheduler.org/[]. For convenience purposes, Spring offers a couple of
|
||||
classes that simplify using Quartz within Spring-based applications.
|
||||
|
||||
|
||||
@@ -6773,7 +6773,7 @@ caching occurs. It also improves performance but does so by letting the same dat
|
||||
read multiple times in a fast fashion.
|
||||
|
||||
You can find a further explanation of the differences between a buffer and a cache
|
||||
http://en.wikipedia.org/wiki/Cache_(computing)#The_difference_between_buffer_and_cache[here].
|
||||
https://en.wikipedia.org/wiki/Cache_(computing)#The_difference_between_buffer_and_cache[here].
|
||||
****
|
||||
|
||||
At its core, the cache abstraction applies caching to Java methods, thus reducing the number
|
||||
@@ -6802,7 +6802,7 @@ materialized by the `org.springframework.cache.Cache` and
|
||||
`org.springframework.cache.CacheManager` interfaces.
|
||||
|
||||
Spring provides <<cache-store-configuration, a few implementations>> of that abstraction:
|
||||
JDK `java.util.concurrent.ConcurrentMap` based caches, http://ehcache.org/[Ehcache 2.x],
|
||||
JDK `java.util.concurrent.ConcurrentMap` based caches, https://www.ehcache.org/[Ehcache 2.x],
|
||||
Gemfire cache, https://github.com/ben-manes/caffeine/wiki[Caffeine], and JSR-107
|
||||
compliant caches (such as Ehcache 3.x). See <<cache-plug>> for more information on
|
||||
plugging in other cache stores and providers.
|
||||
@@ -7310,8 +7310,8 @@ Alternatively, for XML configuration you can use the `cache:annotation-driven` e
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/cache https://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
|
||||
<cache:annotation-driven/>
|
||||
</beans>
|
||||
@@ -7843,7 +7843,7 @@ Clearly, there are plenty of caching products out there that you can use as a ba
|
||||
store. To plug them in, you need to provide a `CacheManager` and a `Cache` implementation,
|
||||
since, unfortunately, there is no available standard that we can use instead.
|
||||
This may sound harder than it is, since, in practice, the classes tend to be simple
|
||||
http://en.wikipedia.org/wiki/Adapter_pattern[adapters] that map the caching abstraction
|
||||
https://en.wikipedia.org/wiki/Adapter_pattern[adapters] that map the caching abstraction
|
||||
framework on top of the storage API, as the `ehcache` classes do. Most `CacheManager`
|
||||
classes can use the classes in the `org.springframework.cache.support` package
|
||||
(such as `AbstractCacheManager` which takes care of the boiler-plate code,
|
||||
|
||||
@@ -107,8 +107,8 @@ Groovy-defined `Messenger` implementation into an instance of the
|
||||
<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">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/lang https://www.springframework.org/schema/lang/spring-lang.xsd">
|
||||
|
||||
<!-- this is the bean definition for the Groovy-backed Messenger implementation -->
|
||||
<lang:groovy id="messenger" script-source="classpath:Messenger.groovy">
|
||||
@@ -817,8 +817,8 @@ a <<core.adoc#beans-factory-scopes-prototype, prototype>>:
|
||||
<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">
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/lang https://www.springframework.org/schema/lang/spring-lang.xsd">
|
||||
|
||||
<lang:groovy id="messenger" script-source="classpath:Messenger.groovy" scope="prototype">
|
||||
<lang:property name="message" value="I Can Do The RoboCop" />
|
||||
@@ -857,8 +857,8 @@ the correct schema so that the tags in the `lang` namespace are available to you
|
||||
<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"__>
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
__http://www.springframework.org/schema/lang https://www.springframework.org/schema/lang/spring-lang.xsd"__>
|
||||
|
||||
<!-- bean definitions here -->
|
||||
|
||||
@@ -876,4 +876,4 @@ in this chapter:
|
||||
|
||||
* The http://www.groovy-lang.org/[Groovy] homepage
|
||||
* The http://www.beanshell.org/[BeanShell] homepage
|
||||
* The http://jruby.org/[JRuby] homepage
|
||||
* The https://www.jruby.org[JRuby] homepage
|
||||
|
||||
@@ -11,7 +11,7 @@ Kotlin applications almost as if the Spring Framework were a native Kotlin frame
|
||||
|
||||
The easiest way to learn about Spring and Kotlin is to follow
|
||||
https://spring.io/guides/tutorials/spring-boot-kotlin/[this comprehensive tutorial].
|
||||
Feel free to join the #spring channel of http://slack.kotlinlang.org/[Kotlin Slack]
|
||||
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.
|
||||
|
||||
@@ -86,7 +86,7 @@ which cleanly deals with `null` values at compile time rather than bumping into
|
||||
`NullPointerException` at runtime. This makes applications safer through nullability
|
||||
declarations and expressing "`value or no value`" semantics without paying the cost of wrappers, such as `Optional`.
|
||||
(Kotlin allows using functional constructs with nullable values. See this
|
||||
http://www.baeldung.com/kotlin-null-safety[comprehensive guide to Kotlin null-safety].)
|
||||
https://www.baeldung.com/kotlin-null-safety[comprehensive guide to Kotlin null-safety].)
|
||||
|
||||
Although Java does not let you express null-safety in its type-system, the Spring Framework
|
||||
provides <<core#null-safety, null-safety of the whole Spring Framework API>>
|
||||
@@ -369,7 +369,7 @@ mockMvc.get("/person/{name}", "Lee") {
|
||||
=== Kotlin Script Templates
|
||||
|
||||
As of version 4.3, Spring Framework provides a
|
||||
http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/view/script/ScriptTemplateView.html[`ScriptTemplateView`]
|
||||
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/view/script/ScriptTemplateView.html[`ScriptTemplateView`]
|
||||
to render templates by using script engines. It supports
|
||||
https://www.jcp.org/en/jsr/detail?id=223[JSR-223].
|
||||
Spring Framework 5 goes even further by extending this feature to WebFlux and supporting
|
||||
@@ -444,7 +444,7 @@ Meta-annotations support means that types annotated with `@Configuration`, `@Con
|
||||
`@RestController`, `@Service`, or `@Repository` are automatically opened since these
|
||||
annotations are meta-annotated with `@Component`.
|
||||
|
||||
http://start.spring.io/#!language=kotlin[start.spring.io] enables it by default, so, in practice,
|
||||
https://start.spring.io/#!language=kotlin[start.spring.io] enables it by default, so, in practice,
|
||||
you can write your Kotlin beans without any additional `open` keyword, as in Java.
|
||||
|
||||
|
||||
@@ -800,8 +800,8 @@ MVC and its annotation-based programming model is the recommended choice.
|
||||
We recommend the following resources for people learning how to build applications with
|
||||
Kotlin and the Spring Framework:
|
||||
|
||||
* http://kotlinlang.org/docs/reference/[Kotlin language reference]
|
||||
* http://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel)
|
||||
* https://kotlinlang.org/docs/reference/[Kotlin language reference]
|
||||
* https://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel)
|
||||
* https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow, with `spring` and `kotlin` tags]
|
||||
* https://try.kotlinlang.org/[Try Kotlin in your browser]
|
||||
* https://blog.jetbrains.com/kotlin/[Kotlin blog]
|
||||
|
||||
@@ -143,13 +143,13 @@ top-level project page.
|
||||
== Getting Started
|
||||
|
||||
If you are just getting started with Spring, you may want to begin using the Spring
|
||||
Framework by creating a http://projects.spring.io/spring-boot/[Spring Boot]-based
|
||||
Framework by creating a https://projects.spring.io/spring-boot/[Spring Boot]-based
|
||||
application. Spring Boot provides a quick (and opinionated) way to create a
|
||||
production-ready Spring-based application. It is based on the Spring Framework, favors
|
||||
convention over configuration, and is designed to get you up and running as quickly
|
||||
as possible.
|
||||
|
||||
You can use http://start.spring.io/[start.spring.io] to generate a basic project or follow
|
||||
You can use https://start.spring.io/[start.spring.io] to generate a basic project or follow
|
||||
one of the https://spring.io/guides["Getting Started" guides], such as
|
||||
https://spring.io/guides/gs/rest-service/[Getting Started Building a RESTful Web Service].
|
||||
As well as being easier to digest, these guides are very task focused, and most of them
|
||||
|
||||
@@ -228,7 +228,7 @@ Alternatively, if you want to assert there is no response content, you can use c
|
||||
|
||||
When you use `expectBody()`, the response is consumed as a `byte[]`. This is useful for
|
||||
raw content assertions. For example, you can use
|
||||
http://jsonassert.skyscreamer.org[JSONAssert] to verify JSON content, as follows:
|
||||
https://jsonassert.skyscreamer.org[JSONAssert] to verify JSON content, as follows:
|
||||
|
||||
[source,java,intent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
|
||||
@@ -90,7 +90,7 @@ and configuration in testing scenarios without modification.
|
||||
The `org.springframework.mock.web` package contains a comprehensive set of Servlet API
|
||||
mock objects that are useful for testing web contexts, controllers, and filters. These
|
||||
mock objects are targeted at usage with Spring's Web MVC framework and are generally more
|
||||
convenient to use than dynamic mock objects (such as http://www.easymock.org[EasyMock])
|
||||
convenient to use than dynamic mock objects (such as http://easymock.org/[EasyMock])
|
||||
or alternative Servlet API mock objects (such as http://www.mockobjects.com[MockObjects]).
|
||||
|
||||
TIP: Since Spring Framework 5.0, the mock objects in `org.springframework.mock.web` are
|
||||
@@ -2989,7 +2989,7 @@ suite. This can be achieved by executing all tests as a group within an IDE. Sim
|
||||
when executing tests with a build framework such as Ant, Maven, or Gradle, it is
|
||||
important to make sure that the build framework does not fork between tests. For example,
|
||||
if the
|
||||
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#forkMode[`forkMode`]
|
||||
https://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#forkMode[`forkMode`]
|
||||
for the Maven Surefire plug-in is set to `always` or `pertest`, the TestContext framework
|
||||
cannot cache application contexts between test classes, and the build process runs
|
||||
significantly more slowly as a result.
|
||||
@@ -3287,7 +3287,7 @@ shows this configuration:
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<!-- this bean will be injected into the HibernateTitleRepositoryTests class -->
|
||||
<bean id="titleRepository" class="com.foo.repository.hibernate.HibernateTitleRepository">
|
||||
@@ -4269,7 +4269,7 @@ TestNG:
|
||||
|
||||
* Dependency injection for test constructors, test methods, and test lifecycle callback
|
||||
methods. See <<testcontext-junit-jupiter-di>> for further details.
|
||||
* Powerful support for link:http://junit.org/junit5/docs/current/user-guide/#extensions-conditions[conditional
|
||||
* Powerful support for link:https://junit.org/junit5/docs/current/user-guide/#extensions-conditions[conditional
|
||||
test execution] based on SpEL expressions, environment variables, system properties,
|
||||
and so on. See the documentation for `@EnabledIf` and `@DisabledIf` in
|
||||
<<integration-testing-annotations-junit-jupiter>> for further details and examples.
|
||||
@@ -4343,7 +4343,7 @@ See the documentation for `@SpringJUnitConfig` and `@SpringJUnitWebConfig` in
|
||||
===== Dependency Injection with `SpringExtension`
|
||||
|
||||
`SpringExtension` implements the
|
||||
link:http://junit.org/junit5/docs/current/user-guide/#extensions-parameter-resolution[`ParameterResolver`]
|
||||
link:https://junit.org/junit5/docs/current/user-guide/#extensions-parameter-resolution[`ParameterResolver`]
|
||||
extension API from JUnit Jupiter, which lets Spring provide dependency injection for test
|
||||
constructors, test methods, and test lifecycle callback methods.
|
||||
|
||||
@@ -5023,7 +5023,7 @@ when using HTML-based views. This integration lets you:
|
||||
|
||||
* Easily test HTML pages by using tools such as
|
||||
http://htmlunit.sourceforge.net/[HtmlUnit],
|
||||
http://seleniumhq.org/projects/webdriver/[WebDriver], and
|
||||
https://www.seleniumhq.org[WebDriver], and
|
||||
http://www.gebish.org/manual/current/#spock-junit-testng[Geb] without the need to
|
||||
deploy to a Servlet container.
|
||||
* Test JavaScript within pages.
|
||||
@@ -5246,7 +5246,7 @@ to create a message, as the following example shows:
|
||||
----
|
||||
|
||||
Finally, we can verify that a new message was created successfully. The following
|
||||
assertions use the http://joel-costigliola.github.io/assertj/[AssertJ] library:
|
||||
assertions use the https://joel-costigliola.github.io/assertj/[AssertJ] library:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
@@ -5345,7 +5345,7 @@ TIP: For additional information on creating a `MockMvc` instance, see
|
||||
|
||||
In the previous sections, we have seen how to use MockMvc in conjunction with the raw
|
||||
HtmlUnit APIs. In this section, we use additional abstractions within the Selenium
|
||||
http://docs.seleniumhq.org/projects/webdriver/[WebDriver] to make things even easier.
|
||||
https://docs.seleniumhq.org/projects/webdriver/[WebDriver] to make things even easier.
|
||||
|
||||
[[spring-mvc-test-server-htmlunit-webdriver-why]]
|
||||
====== Why WebDriver and MockMvc?
|
||||
@@ -5354,7 +5354,7 @@ We can already use HtmlUnit and MockMvc, so why would we want to use WebDriver?
|
||||
Selenium WebDriver provides a very elegant API that lets us easily organize our code. To
|
||||
better show how it works, we explore an example in this section.
|
||||
|
||||
NOTE: Despite being a part of http://docs.seleniumhq.org/[Selenium], WebDriver does not
|
||||
NOTE: Despite being a part of https://docs.seleniumhq.org/[Selenium], WebDriver does not
|
||||
require a Selenium Server to run your tests.
|
||||
|
||||
Suppose we need to ensure that a message is created properly. The tests involve finding
|
||||
@@ -5546,7 +5546,7 @@ annotation to look up our submit button with a `css` selector (*input[type=submi
|
||||
|
||||
|
||||
Finally, we can verify that a new message was created successfully. The following
|
||||
assertions use the http://joel-costigliola.github.io/assertj/[AssertJ] assertion library:
|
||||
assertions use the https://joel-costigliola.github.io/assertj/[AssertJ] assertion library:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
@@ -5889,21 +5889,21 @@ include::testing-webtestclient.adoc[leveloffset=+2]
|
||||
== Further Resources
|
||||
See the following resources for more information about testing:
|
||||
|
||||
* http://www.junit.org/[JUnit]: "`A programmer-oriented testing framework for Java`".
|
||||
* https://www.junit.org/[JUnit]: "`A programmer-oriented testing framework for Java`".
|
||||
Used by the Spring Framework in its test suite.
|
||||
* http://testng.org/[TestNG]: A testing framework inspired by JUnit with added support
|
||||
for annotations, test groups, data-driven testing, distributed testing, and other features.
|
||||
* http://joel-costigliola.github.io/assertj/[AssertJ]: "`Fluent assertions for Java`",
|
||||
* https://joel-costigliola.github.io/assertj/[AssertJ]: "`Fluent assertions for Java`",
|
||||
including support for Java 8 lambdas, streams, and other features.
|
||||
* http://en.wikipedia.org/wiki/Mock_Object[Mock Objects]: Article in Wikipedia.
|
||||
* https://en.wikipedia.org/wiki/Mock_Object[Mock Objects]: Article in Wikipedia.
|
||||
* http://www.mockobjects.com/[MockObjects.com]: Web site dedicated to mock objects, a
|
||||
technique for improving the design of code within test-driven development.
|
||||
* http://mockito.org/[Mockito]: Java mock library based on the
|
||||
* https://mockito.github.io[Mockito]: Java mock library based on the
|
||||
http://xunitpatterns.com/Test%20Spy.html[Test Spy] pattern.
|
||||
* http://www.easymock.org/[EasyMock]: Java library "`that provides Mock Objects for
|
||||
* http://easymock.org/[EasyMock]: Java library "`that provides Mock Objects for
|
||||
interfaces (and objects through the class extension) by generating them on the fly
|
||||
using Java's proxy mechanism.`" Used by the Spring Framework in its test suite.
|
||||
* http://www.jmock.org/[JMock]: Library that supports test-driven development of Java
|
||||
* http://jmock.org/[JMock]: Library that supports test-driven development of Java
|
||||
code with mock objects.
|
||||
* http://dbunit.sourceforge.net/[DbUnit]: JUnit extension (also usable with Ant and
|
||||
Maven) that is targeted at database-driven projects and, among other things, puts your
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:docinfo1:
|
||||
|
||||
This part of the documentation covers support for reactive-stack web applications built
|
||||
on a http://www.reactive-streams.org/[Reactive Streams] API to run on non-blocking
|
||||
on a https://www.reactive-streams.org/[Reactive Streams] API to run on non-blocking
|
||||
servers, such as Netty, Undertow, and Servlet 3.1+ containers. Individual chapters cover
|
||||
the <<webflux, Spring WebFlux>> framework,
|
||||
the reactive <<webflux-client, `WebClient`>>, support for <<webflux-test, testing>>,
|
||||
|
||||
@@ -164,7 +164,7 @@ The following example shows how to use `FacesContextUtils`:
|
||||
[[struts]]
|
||||
== Apache Struts 2.x
|
||||
|
||||
Invented by Craig McClanahan, http://struts.apache.org[Struts] is an open-source project
|
||||
Invented by Craig McClanahan, https://struts.apache.org[Struts] is an open-source project
|
||||
hosted by the Apache Software Foundation. At the time, it greatly simplified the
|
||||
JSP/Servlet programming paradigm and won over many developers who were using proprietary
|
||||
frameworks. It simplified the programming model, it was open source (and thus free as in
|
||||
@@ -181,7 +181,7 @@ built-in Spring integration.
|
||||
[[tapestry]]
|
||||
== Apache Tapestry 5.x
|
||||
|
||||
http://tapestry.apache.org/[Tapestry] is a ""Component oriented framework for creating
|
||||
https://tapestry.apache.org/[Tapestry] is a ""Component oriented framework for creating
|
||||
dynamic, robust, highly scalable web applications in Java.""
|
||||
|
||||
While Spring has its own <<mvc, powerful web layer>>, there are a number of unique
|
||||
@@ -200,6 +200,6 @@ https://tapestry.apache.org/integrating-with-spring-framework.html[integration m
|
||||
The following links go to further resources about the various web frameworks described in
|
||||
this chapter.
|
||||
|
||||
* The http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html[JSF] homepage
|
||||
* The http://struts.apache.org/[Struts] homepage
|
||||
* The http://tapestry.apache.org/[Tapestry] homepage
|
||||
* The https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html[JSF] homepage
|
||||
* The https://struts.apache.org/[Struts] homepage
|
||||
* The https://tapestry.apache.org/[Tapestry] homepage
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
UriComponents uriComponents = UriComponentsBuilder
|
||||
.fromUriString("http://example.com/hotels/{hotel}") // <1>
|
||||
.fromUriString("https://example.com/hotels/{hotel}") // <1>
|
||||
.queryParam("q", "{q}") // <2>
|
||||
.encode() // <3>
|
||||
.build(); // <4>
|
||||
@@ -29,7 +29,7 @@ as the following example shows:
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
URI uri = UriComponentsBuilder
|
||||
.fromUriString("http://example.com/hotels/{hotel}")
|
||||
.fromUriString("https://example.com/hotels/{hotel}")
|
||||
.queryParam("q", "{q}")
|
||||
.encode()
|
||||
.buildAndExpand("Westin", "123")
|
||||
@@ -43,7 +43,7 @@ as the following example shows:
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
URI uri = UriComponentsBuilder
|
||||
.fromUriString("http://example.com/hotels/{hotel}")
|
||||
.fromUriString("https://example.com/hotels/{hotel}")
|
||||
.queryParam("q", "{q}")
|
||||
.build("Westin", "123");
|
||||
----
|
||||
@@ -54,7 +54,7 @@ You shorter it further still with a full URI template, as the following example
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
URI uri = UriComponentsBuilder
|
||||
.fromUriString("http://example.com/hotels/{hotel}?q={q}")
|
||||
.fromUriString("https://example.com/hotels/{hotel}?q={q}")
|
||||
.build("Westin", "123");
|
||||
----
|
||||
|
||||
@@ -81,7 +81,7 @@ The following example shows how to configure a `RestTemplate`:
|
||||
----
|
||||
// import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode;
|
||||
|
||||
String baseUrl = "http://example.org";
|
||||
String baseUrl = "https://example.org";
|
||||
DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl);
|
||||
factory.setEncodingMode(EncodingMode.TEMPLATE_AND_VARIABLES);
|
||||
|
||||
@@ -96,7 +96,7 @@ The following example configures a `WebClient`:
|
||||
----
|
||||
// import org.springframework.web.util.DefaultUriBuilderFactory.EncodingMode;
|
||||
|
||||
String baseUrl = "http://example.org";
|
||||
String baseUrl = "https://example.org";
|
||||
DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl);
|
||||
factory.setEncodingMode(EncodingMode.TEMPLATE_AND_VARIABLES);
|
||||
|
||||
@@ -110,7 +110,7 @@ that holds configuration and preferences, as the following example shows:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
String baseUrl = "http://example.com";
|
||||
String baseUrl = "https://example.com";
|
||||
DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory(baseUrl);
|
||||
|
||||
URI uri = uriBuilderFactory.uriString("/hotels/{hotel}")
|
||||
@@ -183,7 +183,7 @@ as the following example shows:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
String baseUrl = "http://example.com";
|
||||
String baseUrl = "https://example.com";
|
||||
DefaultUriBuilderFactory factory = new DefaultUriBuilderFactory(baseUrl)
|
||||
factory.setEncodingMode(EncodingMode.TEMPLATE_AND_VALUES);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ from evil.com should not be able to make AJAX requests to your bank API with you
|
||||
credentials -- for example, withdrawing money from your account!
|
||||
|
||||
Cross-Origin Resource Sharing (CORS) is a http://www.w3.org/TR/cors/[W3C specification]
|
||||
implemented by http://caniuse.com/#feat=cors[most browsers] that lets you specify
|
||||
implemented by https://caniuse.com/#feat=cors[most browsers] that lets you specify
|
||||
what kind of cross-domain requests are authorized, rather than using less secure and less
|
||||
powerful workarounds based on IFRAME or JSONP.
|
||||
|
||||
@@ -122,7 +122,7 @@ The following example specifies a certain domain and sets `maxAge` to an hour:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@CrossOrigin(origins = "http://domain2.com", maxAge = 3600)
|
||||
@CrossOrigin(origins = "https://domain2.com", maxAge = 3600)
|
||||
@RestController
|
||||
@RequestMapping("/account")
|
||||
public class AccountController {
|
||||
@@ -150,7 +150,7 @@ as the following example shows:
|
||||
@RequestMapping("/account")
|
||||
public class AccountController {
|
||||
|
||||
@CrossOrigin("http://domain2.com") <2>
|
||||
@CrossOrigin("https://domain2.com") <2>
|
||||
@GetMapping("/{id}")
|
||||
public Mono<Account> retrieve(@PathVariable Long id) {
|
||||
// ...
|
||||
@@ -202,7 +202,7 @@ public class WebConfig implements WebFluxConfigurer {
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
|
||||
registry.addMapping("/api/**")
|
||||
.allowedOrigins("http://domain2.com")
|
||||
.allowedOrigins("https://domain2.com")
|
||||
.allowedMethods("PUT", "DELETE")
|
||||
.allowedHeaders("header1", "header2", "header3")
|
||||
.exposedHeaders("header1", "header2")
|
||||
@@ -244,7 +244,7 @@ CorsWebFilter corsFilter() {
|
||||
// config.applyPermitDefaultValues()
|
||||
|
||||
config.setAllowCredentials(true);
|
||||
config.addAllowedOrigin("http://domain1.com");
|
||||
config.addAllowedOrigin("https://domain1.com");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedMethod("*");
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ Most applications can run through the WebFlux Java configuration, see <<webflux-
|
||||
|
||||
`ServerRequest` and `ServerResponse` are immutable interfaces that offer JDK 8-friendly
|
||||
access to the HTTP request and response.
|
||||
Both request and response provide http://www.reactive-streams.org[Reactive Streams] back pressure
|
||||
Both request and response provide https://www.reactive-streams.org[Reactive Streams] back pressure
|
||||
against the body streams.
|
||||
The request body is represented with a Reactor `Flux` or `Mono`.
|
||||
The response body is represented with any Reactive Streams `Publisher`, including `Flux` and `Mono`.
|
||||
|
||||
@@ -19,13 +19,13 @@ templates that can be previewed in a browser by double-clicking, which is very
|
||||
helpful for independent work on UI templates (for example, by a designer) without the need for a
|
||||
running server. Thymeleaf offers an extensive set of features, and it is actively developed
|
||||
and maintained. For a more complete introduction, see the
|
||||
http://www.thymeleaf.org/[Thymeleaf] project home page.
|
||||
https://www.thymeleaf.org/[Thymeleaf] project home page.
|
||||
|
||||
The Thymeleaf integration with Spring WebFlux is managed by the Thymeleaf project. The
|
||||
configuration involves a few bean declarations, such as
|
||||
`SpringResourceTemplateResolver`, `SpringWebFluxTemplateEngine`, and
|
||||
`ThymeleafReactiveViewResolver`. For more details, see
|
||||
http://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] and the WebFlux integration
|
||||
https://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] and the WebFlux integration
|
||||
http://forum.thymeleaf.org/Thymeleaf-3-0-8-JUST-PUBLISHED-td4030687.html[announcement].
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ http://forum.thymeleaf.org/Thymeleaf-3-0-8-JUST-PUBLISHED-td4030687.html[announc
|
||||
== FreeMarker
|
||||
[.small]#<<web.adoc#mvc-view-freemarker, Same as in Spring MVC>>#
|
||||
|
||||
http://www.freemarker.org[Apache FreeMarker] is a template engine for generating any
|
||||
https://freemarker.apache.org/[Apache FreeMarker] is a template engine for generating any
|
||||
kind of text output from HTML to email and others. The Spring Framework has a built-in
|
||||
integration for using Spring WebFlux with FreeMarker templates.
|
||||
|
||||
@@ -127,13 +127,13 @@ The following table shows the templating libraries that we have tested on differ
|
||||
[%header]
|
||||
|===
|
||||
|Scripting Library |Scripting Engine
|
||||
|http://handlebarsjs.com/[Handlebars] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://mustache.github.io/[Mustache] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://facebook.github.io/react/[React] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://www.embeddedjs.com/[EJS] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://www.stuartellis.eu/articles/erb/[ERB] |http://jruby.org[JRuby]
|
||||
|https://docs.python.org/2/library/string.html#template-strings[String templates] |http://www.jython.org/[Jython]
|
||||
|https://github.com/sdeleuze/kotlin-script-templating[Kotlin Script templating] |http://kotlinlang.org/[Kotlin]
|
||||
|https://handlebarsjs.com/[Handlebars] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://mustache.github.io/[Mustache] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://facebook.github.io/react/[React] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://www.embeddedjs.com/[EJS] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://www.stuartellis.name/articles/erb/[ERB] |https://www.jruby.org[JRuby]
|
||||
|https://docs.python.org/2/library/string.html#template-strings[String templates] |https://www.jython.org/[Jython]
|
||||
|https://github.com/sdeleuze/kotlin-script-templating[Kotlin Script templating] |https://kotlinlang.org/[Kotlin]
|
||||
|===
|
||||
|
||||
TIP: The basic rule for integrating any other script engine is that it must implement the
|
||||
@@ -147,17 +147,17 @@ TIP: The basic rule for integrating any other script engine is that it must impl
|
||||
|
||||
You need to have the script engine on your classpath, the details of which vary by script engine:
|
||||
|
||||
* The http://openjdk.java.net/projects/nashorn/[Nashorn] JavaScript engine is provided with
|
||||
* The https://openjdk.java.net/projects/nashorn/[Nashorn] JavaScript engine is provided with
|
||||
Java 8+. Using the latest update release available is highly recommended.
|
||||
* http://jruby.org[JRuby] should be added as a dependency for Ruby support.
|
||||
* http://www.jython.org[Jython] should be added as a dependency for Python support.
|
||||
* https://www.jruby.org[JRuby] should be added as a dependency for Ruby support.
|
||||
* https://www.jython.org[Jython] should be added as a dependency for Python support.
|
||||
* `org.jetbrains.kotlin:kotlin-script-util` dependency and a `META-INF/services/javax.script.ScriptEngineFactory`
|
||||
file containing a `org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory`
|
||||
line should be added for Kotlin script support. See
|
||||
https://github.com/sdeleuze/kotlin-script-templating[this example] for more detail.
|
||||
|
||||
You need to have the script templating library. One way to do that for Javascript is
|
||||
through http://www.webjars.org/[WebJars].
|
||||
through https://www.webjars.org/[WebJars].
|
||||
|
||||
|
||||
|
||||
@@ -205,9 +205,9 @@ The `render` function is called with the following parameters:
|
||||
`Mustache.render()` is natively compatible with this signature, so you can call it directly.
|
||||
|
||||
If your templating technology requires some customization, you can provide a script that
|
||||
implements a custom render function. For example, http://handlebarsjs.com[Handlerbars]
|
||||
implements a custom render function. For example, https://handlebarsjs.com[Handlerbars]
|
||||
needs to compile templates before using them and requires a
|
||||
http://en.wikipedia.org/wiki/Polyfill[polyfill] in order to emulate some
|
||||
https://en.wikipedia.org/wiki/Polyfill[polyfill] in order to emulate some
|
||||
browser facilities not available in the server-side script engine.
|
||||
The following example shows how to set a custom render function:
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ The following example shows how to do so:
|
||||
[source,java,intent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
WebClient client = WebClient.create("http://example.org");
|
||||
WebClient client = WebClient.create("https://example.org");
|
||||
|
||||
Mono<Person> result = client.get()
|
||||
.uri("/persons/{id}", id).accept(MediaType.APPLICATION_JSON)
|
||||
@@ -513,7 +513,7 @@ WebClient client = WebClient.builder()
|
||||
})
|
||||
.build();
|
||||
|
||||
client.get().uri("http://example.org/")
|
||||
client.get().uri("https://example.org/")
|
||||
.attribute("myAttribute", "...")
|
||||
.retrieve()
|
||||
.bodyToMono(Void.class);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
The original web framework included in the Spring Framework, Spring Web MVC, was
|
||||
purpose-built for the Servlet API and Servlet containers. The reactive-stack web framework,
|
||||
Spring WebFlux, was added later in version 5.0. It is fully non-blocking, supports
|
||||
http://www.reactive-streams.org/[Reactive Streams] back pressure, and runs on such servers as
|
||||
https://www.reactive-streams.org/[Reactive Streams] back pressure, and runs on such servers as
|
||||
Netty, Undertow, and Servlet 3.1+ containers.
|
||||
|
||||
Both web frameworks mirror the names of their source modules
|
||||
@@ -62,9 +62,9 @@ https://github.com/reactive-streams/reactive-streams-jvm/blob/master/README.md#s
|
||||
(also https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.html[adopted] in Java 9)
|
||||
that defines the interaction between asynchronous components with back pressure.
|
||||
For example a data repository (acting as
|
||||
http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/org/reactivestreams/Publisher.html[Publisher])
|
||||
https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/org/reactivestreams/Publisher.html[Publisher])
|
||||
can produce data that an HTTP server (acting as
|
||||
http://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/org/reactivestreams/Subscriber.html[Subscriber])
|
||||
https://www.reactive-streams.org/reactive-streams-1.0.1-javadoc/org/reactivestreams/Subscriber.html[Subscriber])
|
||||
can then write to the response. The main purpose of Reactive Streams is to let the
|
||||
subscriber to control how quickly or how slowly the publisher produces data.
|
||||
|
||||
@@ -1083,7 +1083,7 @@ The net effect is the same as if the controller had returned a `RedirectView` or
|
||||
`Rendering.redirectTo("abc").build()`, but now the controller itself can
|
||||
operate in terms of logical view names. A view name such as
|
||||
`redirect:/some/resource` is relative to the current application, while a view name such as
|
||||
`redirect:http://example.com/arbitrary/path` redirects to an absolute URL.
|
||||
`redirect:https://example.com/arbitrary/path` redirects to an absolute URL.
|
||||
|
||||
|
||||
[[webflux-multiple-representations]]
|
||||
@@ -1696,9 +1696,9 @@ can be customized through a `WebDataBinder` (see <<mvc-ann-initbinder>>) or by r
|
||||
==== Matrix Variables
|
||||
[.small]#<<web.adoc#mvc-ann-matrix-variables, Same as in Spring MVC>>#
|
||||
|
||||
http://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
https://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
path segments. In Spring WebFlux, we refer to those as "`matrix variables`" based on an
|
||||
http://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
|
||||
https://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
|
||||
can be also be referred to as URI path parameters.
|
||||
|
||||
Matrix variables can appear in any path segment, with each variable separated by a semicolon and
|
||||
@@ -2369,7 +2369,7 @@ Spring offers support for the Jackson JSON library.
|
||||
[.small]#<<web.adoc#mvc-ann-jackson, Same as in Spring MVC>>#
|
||||
|
||||
Spring WebFlux provides built-in support for
|
||||
http://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views],
|
||||
https://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views],
|
||||
which allows rendering only a subset of all fields in an `Object`. To use it with
|
||||
`@ResponseBody` or `ResponseEntity` controller methods, you can use Jackson's
|
||||
`@JsonView` annotation to activate a serialization view class, as the following example shows:
|
||||
@@ -2708,7 +2708,7 @@ include::webflux-cors.adoc[leveloffset=+1]
|
||||
== Web Security
|
||||
[.small]#<<web.adoc#mvc-web-security, Same as in Spring MVC>>#
|
||||
|
||||
The http://projects.spring.io/spring-security/[Spring Security] project provides support
|
||||
The https://projects.spring.io/spring-security/[Spring Security] project provides support
|
||||
for protecting web applications from malicious exploits. See the Spring Security
|
||||
reference documentation, including:
|
||||
|
||||
@@ -3033,8 +3033,8 @@ For Jackson JSON and XML, consider using
|
||||
{api-spring-framework}/http/converter/json/Jackson2ObjectMapperBuilder.html[`Jackson2ObjectMapperBuilder`],
|
||||
which customizes Jackson's default properties with the following ones:
|
||||
|
||||
* http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
|
||||
It also automatically registers the following well-known modules if they are detected on the classpath:
|
||||
|
||||
@@ -3216,7 +3216,7 @@ Note that, when using both `EncodedResourceResolver` (for example, Gzip, Brotli
|
||||
`VersionedResourceResolver`, they must be registered in that order, to ensure content-based
|
||||
versions are always computed reliably based on the unencoded file.
|
||||
|
||||
http://www.webjars.org/documentation[WebJars] are also supported through the
|
||||
https://www.webjars.org/documentation[WebJars] are also supported through the
|
||||
`WebJarsResourceResolver` which is automatically registered when the
|
||||
`org.webjars:webjars-locator-core` library is present on the classpath. The resolver can
|
||||
re-write URLs to include the version of the jar and can also match against incoming URLs
|
||||
|
||||
@@ -18,7 +18,7 @@ from evil.com should not be able to make AJAX requests to your bank API with you
|
||||
credentials -- for example withdrawing money from your account!
|
||||
|
||||
Cross-Origin Resource Sharing (CORS) is a http://www.w3.org/TR/cors/[W3C specification]
|
||||
implemented by http://caniuse.com/#feat=cors[most browsers] that lets you specify
|
||||
implemented by https://caniuse.com/#feat=cors[most browsers] that lets you specify
|
||||
what kind of cross-domain requests are authorized, rather than using less secure and less
|
||||
powerful workarounds based on IFRAME or JSONP.
|
||||
|
||||
@@ -121,7 +121,7 @@ as the following example shows:
|
||||
[source,java,indent=0]
|
||||
[subs="verbatim,quotes"]
|
||||
----
|
||||
@CrossOrigin(origins = "http://domain2.com", maxAge = 3600)
|
||||
@CrossOrigin(origins = "https://domain2.com", maxAge = 3600)
|
||||
@RestController
|
||||
@RequestMapping("/account")
|
||||
public class AccountController {
|
||||
@@ -149,7 +149,7 @@ as the following example shows:
|
||||
@RequestMapping("/account")
|
||||
public class AccountController {
|
||||
|
||||
@CrossOrigin("http://domain2.com")
|
||||
@CrossOrigin("https://domain2.com")
|
||||
@GetMapping("/{id}")
|
||||
public Account retrieve(@PathVariable Long id) {
|
||||
// ...
|
||||
@@ -207,7 +207,7 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
|
||||
registry.addMapping("/api/**")
|
||||
.allowedOrigins("http://domain2.com")
|
||||
.allowedOrigins("https://domain2.com")
|
||||
.allowedMethods("PUT", "DELETE")
|
||||
.allowedHeaders("header1", "header2", "header3")
|
||||
.exposedHeaders("header1", "header2")
|
||||
@@ -232,14 +232,14 @@ as the following example shows:
|
||||
<mvc:cors>
|
||||
|
||||
<mvc:mapping path="/api/**"
|
||||
allowed-origins="http://domain1.com, http://domain2.com"
|
||||
allowed-origins="https://domain1.com, https://domain2.com"
|
||||
allowed-methods="GET, PUT"
|
||||
allowed-headers="header1, header2, header3"
|
||||
exposed-headers="header1, header2" allow-credentials="true"
|
||||
max-age="123" />
|
||||
|
||||
<mvc:mapping path="/resources/**"
|
||||
allowed-origins="http://domain1.com" />
|
||||
allowed-origins="https://domain1.com" />
|
||||
|
||||
</mvc:cors>
|
||||
----
|
||||
@@ -271,7 +271,7 @@ CorsConfiguration config = new CorsConfiguration();
|
||||
// config.applyPermitDefaultValues()
|
||||
|
||||
config.setAllowCredentials(true);
|
||||
config.addAllowedOrigin("http://domain1.com");
|
||||
config.addAllowedOrigin("https://domain1.com");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedMethod("*");
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@ for independent work on UI templates (for example, by a designer) without the ne
|
||||
a running server. If you want to replace JSPs, Thymeleaf offers one of the most
|
||||
extensive set of features to make such a transition easier. Thymeleaf is actively
|
||||
developed and maintained. For a more complete introduction, see the
|
||||
http://www.thymeleaf.org/[Thymeleaf] project home page.
|
||||
https://www.thymeleaf.org/[Thymeleaf] project home page.
|
||||
|
||||
The Thymeleaf integration with Spring MVC is managed by the Thymeleaf project.
|
||||
The configuration involves a few bean declarations, such as
|
||||
`ServletContextTemplateResolver`, `SpringTemplateEngine`, and `ThymeleafViewResolver`.
|
||||
See http://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] for more details.
|
||||
See https://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] for more details.
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ See http://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] for more detai
|
||||
== FreeMarker
|
||||
[.small]#<<web-reactive.adoc#webflux-view-freemarker, Same as in Spring WebFlux>>#
|
||||
|
||||
http://www.freemarker.org[Apache FreeMarker] is a template engine for generating any
|
||||
https://freemarker.apache.org/[Apache FreeMarker] is a template engine for generating any
|
||||
kind of text output from HTML to email and others. The Spring Framework has a built-in
|
||||
integration for using Spring MVC with FreeMarker templates.
|
||||
|
||||
@@ -546,13 +546,13 @@ templating libraries on different script engines:
|
||||
[%header]
|
||||
|===
|
||||
|Scripting Library |Scripting Engine
|
||||
|http://handlebarsjs.com/[Handlebars] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://mustache.github.io/[Mustache] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://facebook.github.io/react/[React] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://www.embeddedjs.com/[EJS] |http://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|http://www.stuartellis.eu/articles/erb/[ERB] |http://jruby.org[JRuby]
|
||||
|https://docs.python.org/2/library/string.html#template-strings[String templates] |http://www.jython.org/[Jython]
|
||||
|https://github.com/sdeleuze/kotlin-script-templating[Kotlin Script templating] |http://kotlinlang.org/[Kotlin]
|
||||
|https://handlebarsjs.com/[Handlebars] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://mustache.github.io/[Mustache] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://facebook.github.io/react/[React] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://www.embeddedjs.com/[EJS] |https://openjdk.java.net/projects/nashorn/[Nashorn]
|
||||
|https://www.stuartellis.name/articles/erb/[ERB] |https://www.jruby.org[JRuby]
|
||||
|https://docs.python.org/2/library/string.html#template-strings[String templates] |https://www.jython.org/[Jython]
|
||||
|https://github.com/sdeleuze/kotlin-script-templating[Kotlin Script templating] |https://kotlinlang.org/[Kotlin]
|
||||
|===
|
||||
|
||||
TIP: The basic rule for integrating any other script engine is that it must implement the
|
||||
@@ -566,17 +566,17 @@ TIP: The basic rule for integrating any other script engine is that it must impl
|
||||
|
||||
You need to have the script engine on your classpath, the details of which vary by script engine:
|
||||
|
||||
* The http://openjdk.java.net/projects/nashorn/[Nashorn] JavaScript engine is provided with
|
||||
* The https://openjdk.java.net/projects/nashorn/[Nashorn] JavaScript engine is provided with
|
||||
Java 8+. Using the latest update release available is highly recommended.
|
||||
* http://jruby.org[JRuby] should be added as a dependency for Ruby support.
|
||||
* http://www.jython.org[Jython] should be added as a dependency for Python support.
|
||||
* https://www.jruby.org[JRuby] should be added as a dependency for Ruby support.
|
||||
* https://www.jython.org[Jython] should be added as a dependency for Python support.
|
||||
* `org.jetbrains.kotlin:kotlin-script-util` dependency and a `META-INF/services/javax.script.ScriptEngineFactory`
|
||||
file containing a `org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory`
|
||||
line should be added for Kotlin script support. See
|
||||
https://github.com/sdeleuze/kotlin-script-templating[this example] for more details.
|
||||
|
||||
You need to have the script templating library. One way to do that for Javascript is
|
||||
through http://www.webjars.org/[WebJars].
|
||||
through https://www.webjars.org/[WebJars].
|
||||
|
||||
|
||||
|
||||
@@ -672,9 +672,9 @@ The render function is called with the following parameters:
|
||||
`Mustache.render()` is natively compatible with this signature, so you can call it directly.
|
||||
|
||||
If your templating technology requires some customization, you can provide a script that
|
||||
implements a custom render function. For example, http://handlebarsjs.com[Handlerbars]
|
||||
implements a custom render function. For example, https://handlebarsjs.com[Handlerbars]
|
||||
needs to compile templates before using them and requires a
|
||||
http://en.wikipedia.org/wiki/Polyfill[polyfill] to emulate some
|
||||
https://en.wikipedia.org/wiki/Polyfill[polyfill] to emulate some
|
||||
browser facilities that are not available in the server-side script engine.
|
||||
|
||||
The following example shows how to do so:
|
||||
@@ -1597,7 +1597,7 @@ NOTE: This section focuses on Spring's support for Tiles version 3 in the
|
||||
=== Dependencies
|
||||
|
||||
To be able to use Tiles, you have to add a dependency on Tiles version 3.0.1 or higher
|
||||
and http://tiles.apache.org/framework/dependency-management.html[its transitive dependencies]
|
||||
and https://tiles.apache.org/framework/dependency-management.html[its transitive dependencies]
|
||||
to your project.
|
||||
|
||||
|
||||
@@ -1607,7 +1607,7 @@ to your project.
|
||||
|
||||
To be able to use Tiles, you have to configure it by using files that contain definitions
|
||||
(for basic information on definitions and other Tiles concepts, see
|
||||
http://tiles.apache.org[]). In Spring, this is done by using the `TilesConfigurer`.
|
||||
https://tiles.apache.org[]). In Spring, this is done by using the `TilesConfigurer`.
|
||||
The following example `ApplicationContext` configuration shows how to do so:
|
||||
|
||||
[source,xml,indent=0]
|
||||
|
||||
@@ -691,7 +691,7 @@ redirect is needed. The rest of the view name is the redirect URL.
|
||||
The net effect is the same as if the controller had returned a `RedirectView`, but now
|
||||
the controller itself can operate in terms of logical view names. A logical view
|
||||
name (such as `redirect:/myapp/some/resource`) redirects relative to the current
|
||||
Servlet context, while a name such as `redirect:http://myhost.com/some/arbitrary/path`
|
||||
Servlet context, while a name such as `redirect:https://myhost.com/some/arbitrary/path`
|
||||
redirects to an absolute URL.
|
||||
|
||||
Note that, if a controller method is annotated with the `@ResponseStatus`, the annotation
|
||||
@@ -853,7 +853,7 @@ You can enable changing of locales by adding the `LocaleChangeInterceptor` to on
|
||||
accordingly, calling the `setLocale` method on the `LocaleResolver` in the dispatcher's
|
||||
application context. The next example shows that calls to all `{asterisk}.view` resources
|
||||
that contain a parameter named `siteLanguage` now changes the locale. So, for example,
|
||||
a request for the URL, `http://www.sf.net/home.view?siteLanguage=nl`, changes the site
|
||||
a request for the URL, `https://www.sf.net/home.view?siteLanguage=nl`, changes the site
|
||||
language to Dutch. The following example shows how to intercept the locale:
|
||||
|
||||
[source,xml,indent=0]
|
||||
@@ -979,7 +979,7 @@ request with a simple request parameter.
|
||||
|
||||
`MultipartResolver` from the `org.springframework.web.multipart` package is a strategy
|
||||
for parsing multipart requests including file uploads. There is one implementation
|
||||
based on http://jakarta.apache.org/commons/fileupload[Commons FileUpload] and another
|
||||
based on https://jakarta.apache.org/commons/fileupload[Commons FileUpload] and another
|
||||
based on Servlet 3.0 multipart request parsing.
|
||||
|
||||
To enable multipart handling, you need to declare a `MultipartResolver` bean in your
|
||||
@@ -1239,9 +1239,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
https://www.springframework.org/schema/context/spring-context.xsd">
|
||||
|
||||
<context:component-scan base-package="org.example.web"/>
|
||||
|
||||
@@ -1462,7 +1462,7 @@ Many common path extensions are whitelisted by default. Applications with custom
|
||||
negotiation to avoid having a `Content-Disposition` header added for those extensions.
|
||||
See <<mvc-config-content-negotiation>>.
|
||||
|
||||
See http://pivotal.io/security/cve-2015-5211[CVE-2015-5211] for additional
|
||||
See https://pivotal.io/security/cve-2015-5211[CVE-2015-5211] for additional
|
||||
recommendations related to RFD.
|
||||
|
||||
|
||||
@@ -1914,9 +1914,9 @@ See <<core.adoc#format, Spring Field Formatting>>.
|
||||
==== Matrix Variables
|
||||
[.small]#<<web-reactive.adoc#webflux-ann-matrix-variables, Same as in Spring WebFlux>>#
|
||||
|
||||
http://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
https://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
|
||||
path segments. In Spring MVC, we refer to those as "`matrix variables`" based on an
|
||||
http://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
|
||||
https://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
|
||||
can be also be referred to as URI path parameters.
|
||||
|
||||
Matrix variables can appear in any path segment, with each variable separated by a semicolon and
|
||||
@@ -2693,7 +2693,7 @@ Spring offers support for the Jackson JSON library.
|
||||
[.small]#<<web-reactive.adoc#webflux-ann-jsonview, Same as in Spring WebFlux>>#
|
||||
|
||||
Spring MVC provides built-in support for
|
||||
http://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views],
|
||||
https://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views],
|
||||
which allow rendering only a subset of all fields in an `Object`. To use it with
|
||||
`@ResponseBody` or `ResponseEntity` controller methods, you can use Jackson's
|
||||
`@JsonView` annotation to activate a serialization view class, as the following example shows:
|
||||
@@ -3609,7 +3609,7 @@ invokes the configured exception resolvers and completes the request.
|
||||
==== SSE
|
||||
|
||||
`SseEmitter` (a subclass of `ResponseBodyEmitter`) provides support for
|
||||
http://www.w3.org/TR/eventsource/[Server-Sent Events], where events sent from the server
|
||||
https://www.w3.org/TR/eventsource/[Server-Sent Events], where events sent from the server
|
||||
are formatted according to the W3C SSE specification. To produce an SSE
|
||||
stream from a controller, return `SseEmitter`, as the following example shows:
|
||||
|
||||
@@ -3775,7 +3775,7 @@ include::webmvc-cors.adoc[leveloffset=+1]
|
||||
== Web Security
|
||||
[.small]#<<web-reactive.adoc#webflux-web-security, Same as in Spring WebFlux>>#
|
||||
|
||||
The http://projects.spring.io/spring-security/[Spring Security] project provides support
|
||||
The https://projects.spring.io/spring-security/[Spring Security] project provides support
|
||||
for protecting web applications from malicious exploits. See the Spring Security
|
||||
reference documentation, including:
|
||||
|
||||
@@ -3784,7 +3784,7 @@ reference documentation, including:
|
||||
* {doc-spring-security}/html5/#csrf[CSRF protection]
|
||||
* {doc-spring-security}/html5/#headers[Security Response Headers]
|
||||
|
||||
http://hdiv.org/[HDIV] is another web security framework that integrates with Spring MVC.
|
||||
https://hdiv.org/[HDIV] is another web security framework that integrates with Spring MVC.
|
||||
|
||||
|
||||
|
||||
@@ -3973,9 +3973,9 @@ configuration, as the following example shows:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<mvc:annotation-driven/>
|
||||
|
||||
@@ -4007,7 +4007,7 @@ following example shows:
|
||||
----
|
||||
|
||||
In XML, you can check attributes and sub-elements of `<mvc:annotation-driven/>`. You can
|
||||
view the http://schema.spring.io/mvc/spring-mvc.xsd[Spring MVC XML schema] or use
|
||||
view the https://schema.spring.io/mvc/spring-mvc.xsd[Spring MVC XML schema] or use
|
||||
the code completion feature of your IDE to discover what attributes and
|
||||
sub-elements are available.
|
||||
|
||||
@@ -4049,9 +4049,9 @@ The following example shows how to achieve the same configuration in XML:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<mvc:annotation-driven conversion-service="conversionService"/>
|
||||
|
||||
@@ -4121,9 +4121,9 @@ The following example shows how to achieve the same configuration in XML:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<mvc:annotation-driven validator="globalValidator"/>
|
||||
|
||||
@@ -4290,8 +4290,8 @@ Which adds support for accessing parameter names (a feature added in Java 8).
|
||||
|
||||
This builder customizes Jackson's default properties as follows:
|
||||
|
||||
* http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* http://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/DeserializationFeature.html#FAIL_ON_UNKNOWN_PROPERTIES[`DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES`] is disabled.
|
||||
* https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/MapperFeature.html#DEFAULT_VIEW_INCLUSION[`MapperFeature.DEFAULT_VIEW_INCLUSION`] is disabled.
|
||||
|
||||
It also automatically registers the following well-known modules if they are detected on the classpath:
|
||||
|
||||
@@ -4301,8 +4301,8 @@ It also automatically registers the following well-known modules if they are det
|
||||
* https://github.com/FasterXML/jackson-datatype-jdk8[jackson-datatype-jdk8]: Support for other Java 8 types, such as `Optional`.
|
||||
|
||||
NOTE: Enabling indentation with Jackson XML support requires
|
||||
http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.codehaus.woodstox%22%20AND%20a%3A%22woodstox-core-asl%22[`woodstox-core-asl`]
|
||||
dependency in addition to http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jackson-dataformat-xml%22[`jackson-dataformat-xml`] one.
|
||||
https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.codehaus.woodstox%22%20AND%20a%3A%22woodstox-core-asl%22[`woodstox-core-asl`]
|
||||
dependency in addition to https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22jackson-dataformat-xml%22[`jackson-dataformat-xml`] one.
|
||||
|
||||
Other interesting Jackson modules are available:
|
||||
|
||||
@@ -4560,7 +4560,7 @@ Note that, when using both `EncodedResourceResolver` (for example, for serving g
|
||||
brotli-encoded resources) and `VersionedResourceResolver`, you must register them in this order.
|
||||
That ensures content-based versions are always computed reliably, based on the unencoded file.
|
||||
|
||||
http://www.webjars.org/documentation[WebJars] are also supported through the
|
||||
https://www.webjars.org/documentation[WebJars] are also supported through the
|
||||
`WebJarsResourceResolver` which is automatically registered when the
|
||||
`org.webjars:webjars-locator-core` library is present on the classpath. The resolver can
|
||||
re-write URLs to include the version of the jar and can also match against incoming URLs
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[[websocket-intro]]
|
||||
= Introduction to WebSocket
|
||||
|
||||
The WebSocket protocol, http://tools.ietf.org/html/rfc6455[RFC 6455], provides a standardized
|
||||
The WebSocket protocol, https://tools.ietf.org/html/rfc6455[RFC 6455], provides a standardized
|
||||
way to establish a full-duplex, two-way communication channel between client and server
|
||||
over a single TCP connection. It is a different TCP protocol from HTTP but is designed to
|
||||
work over HTTP, using ports 80 and 443 and allowing re-use of existing firewall rules.
|
||||
|
||||
@@ -83,9 +83,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:handlers>
|
||||
<websocket:mapping path="/myHandler" handler="myHandler"/>
|
||||
@@ -146,9 +146,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:handlers>
|
||||
<websocket:mapping path="/myHandler" handler="myHandler"/>
|
||||
@@ -225,7 +225,7 @@ through the use of the `<absolute-ordering />` element in `web.xml`, as the foll
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
|
||||
<absolute-ordering/>
|
||||
@@ -244,7 +244,7 @@ Java initialization API. The following example shows how to do so:
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
https://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
version="3.0">
|
||||
|
||||
<absolute-ordering>
|
||||
@@ -295,9 +295,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<bean class="org.springframework...ServletServerContainerFactoryBean">
|
||||
<property name="maxTextMessageBufferSize" value="8192"/>
|
||||
@@ -351,9 +351,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:handlers>
|
||||
<websocket:mapping path="/echo" handler="echoHandler"/>
|
||||
@@ -421,7 +421,7 @@ You can configure WebSocket and SockJS allowed origins, as the following example
|
||||
|
||||
@Override
|
||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||
registry.addHandler(myHandler(), "/myHandler").setAllowedOrigins("http://mydomain.com");
|
||||
registry.addHandler(myHandler(), "/myHandler").setAllowedOrigins("https://mydomain.com");
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -442,11 +442,11 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:handlers allowed-origins="http://mydomain.com">
|
||||
<websocket:handlers allowed-origins="https://mydomain.com">
|
||||
<websocket:mapping path="/myHandler" handler="myHandler" />
|
||||
</websocket:handlers>
|
||||
|
||||
@@ -485,7 +485,7 @@ SockJS consists of:
|
||||
|
||||
* The https://github.com/sockjs/sockjs-protocol[SockJS protocol]
|
||||
defined in the form of executable
|
||||
http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html[narrated tests].
|
||||
https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html[narrated tests].
|
||||
* The https://github.com/sockjs/sockjs-client/[SockJS JavaScript client] -- a client library for use in browsers.
|
||||
* SockJS server implementations, including one in the Spring Framework `spring-websocket` module.
|
||||
* A SockJS Java client in the `spring-websocket` module (since version 4.1).
|
||||
@@ -507,7 +507,7 @@ polling is used.
|
||||
All transport requests have the following URL structure:
|
||||
|
||||
----
|
||||
http://host:port/myApp/myEndpoint/{server-id}/{session-id}/{transport}
|
||||
https://host:port/myApp/myEndpoint/{server-id}/{session-id}/{transport}
|
||||
----
|
||||
|
||||
where:
|
||||
@@ -535,7 +535,7 @@ see each transport one at a time. The SockJS client also provides a debug flag,
|
||||
which enables helpful messages in the browser console. On the server side, you can enable
|
||||
`TRACE` logging for `org.springframework.web.socket`.
|
||||
For even more detail, see the SockJS protocol
|
||||
http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html[narrated test].
|
||||
https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html[narrated test].
|
||||
|
||||
|
||||
|
||||
@@ -574,9 +574,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:handlers>
|
||||
<websocket:mapping path="/myHandler" handler="myHandler"/>
|
||||
@@ -612,7 +612,7 @@ a key reason for having SockJS. This section covers important
|
||||
considerations about running in those browsers.
|
||||
|
||||
The SockJS client supports Ajax/XHR streaming in IE 8 and 9 by using Microsoft's
|
||||
http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx[`XDomainRequest`].
|
||||
https://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx[`XDomainRequest`].
|
||||
That works across domains but does not support sending cookies.
|
||||
Cookies are often essential for Java applications.
|
||||
However, since the SockJS client can be used with many server
|
||||
@@ -693,7 +693,7 @@ from concluding that a connection is hung. The Spring SockJS configuration has a
|
||||
called `heartbeatTime` that you can use to customize the frequency. By default, a
|
||||
heartbeat is sent after 25 seconds, assuming no other messages were sent on that
|
||||
connection. This 25-second value is in line with the following
|
||||
http://tools.ietf.org/html/rfc6202[IETF recommendation] for public Internet applications.
|
||||
https://tools.ietf.org/html/rfc6202[IETF recommendation] for public Internet applications.
|
||||
|
||||
NOTE: When using STOMP over WebSocket and SockJS, if the STOMP client and server negotiate
|
||||
heartbeats to be exchanged, the SockJS heartbeats are disabled.
|
||||
@@ -857,7 +857,7 @@ the server need to agree on some protocol that defines message content.
|
||||
[[websocket-stomp-overview]]
|
||||
=== Overview
|
||||
|
||||
http://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] (Simple
|
||||
https://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] (Simple
|
||||
Text Oriented Messaging Protocol) was originally created for scripting languages
|
||||
(such as Ruby, Python, and Perl) to connect to enterprise message brokers. It is
|
||||
designed to address a minimal subset of commonly used messaging patterns. STOMP can be
|
||||
@@ -947,7 +947,7 @@ client subscription.
|
||||
|
||||
The preceding overview is intended to provide the most basic understanding of the
|
||||
STOMP protocol. We recommended reviewing the protocol
|
||||
http://stomp.github.io/stomp-specification-1.2.html[specification] in full.
|
||||
https://stomp.github.io/stomp-specification-1.2.html[specification] in full.
|
||||
|
||||
|
||||
|
||||
@@ -1019,9 +1019,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker application-destination-prefix="/app">
|
||||
<websocket:stomp-endpoint path="/portfolio">
|
||||
@@ -1508,8 +1508,8 @@ As an alternative, you can upgrade your applications to use a full-featured
|
||||
message broker.
|
||||
|
||||
See the STOMP documentation for your message broker of choice (such as
|
||||
http://www.rabbitmq.com/stomp.html[RabbitMQ],
|
||||
http://activemq.apache.org/stomp.html[ActiveMQ], and others), install the broker,
|
||||
https://www.rabbitmq.com/stomp.html[RabbitMQ],
|
||||
https://activemq.apache.org/stomp.html[ActiveMQ], and others), install the broker,
|
||||
and run it with STOMP support enabled. Then you can enable the STOMP broker relay
|
||||
(instead of the simple broker) in the Spring configuration.
|
||||
|
||||
@@ -1546,9 +1546,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker application-destination-prefix="/app">
|
||||
<websocket:stomp-endpoint path="/portfolio" />
|
||||
@@ -1686,9 +1686,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker application-destination-prefix="/app" path-matcher="pathMatcher">
|
||||
<websocket:stomp-endpoint path="/stomp"/>
|
||||
@@ -1768,7 +1768,7 @@ NOTE: Spring Security provides
|
||||
https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/#websocket[WebSocket sub-protocol authorization]
|
||||
that uses a `ChannelInterceptor` to authorize messages based on the user header in them.
|
||||
Also, Spring Session provides a
|
||||
http://docs.spring.io/spring-session/docs/current/reference/html5/#websocket[WebSocket integration]
|
||||
https://docs.spring.io/spring-session/docs/current/reference/html5/#websocket[WebSocket integration]
|
||||
that ensures the user HTTP session does not expire when the WebSocket session is still active.
|
||||
|
||||
|
||||
@@ -1952,7 +1952,7 @@ over, all unique user queues are removed. For example, RabbitMQ creates auto-del
|
||||
queues when you use destinations such as `/exchange/amq.direct/position-updates`.
|
||||
So, in that case, the client could subscribe to `/user/exchange/amq.direct/position-updates`.
|
||||
Similarly, ActiveMQ has
|
||||
http://activemq.apache.org/delete-inactive-destinations.html[configuration options]
|
||||
https://activemq.apache.org/delete-inactive-destinations.html[configuration options]
|
||||
for purging inactive destinations.
|
||||
|
||||
In a multi-application server scenario, a user destination may remain unresolved because
|
||||
@@ -2000,9 +2000,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker preserve-publish-order="true">
|
||||
<!-- ... -->
|
||||
@@ -2379,9 +2379,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker>
|
||||
<websocket:transport send-timeout="15000" send-buffer-size="524288" />
|
||||
@@ -2434,9 +2434,9 @@ The following example shows the XML configuration equivalent of the preceding ex
|
||||
xmlns:websocket="http://www.springframework.org/schema/websocket"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/websocket
|
||||
http://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
https://www.springframework.org/schema/websocket/spring-websocket.xsd">
|
||||
|
||||
<websocket:message-broker>
|
||||
<websocket:transport message-size="131072" />
|
||||
|
||||
10
src/docs/dist/license.txt
vendored
10
src/docs/dist/license.txt
vendored
@@ -1,6 +1,6 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
https://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -244,13 +244,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Copyright (c) 1999-2009, OW2 Consortium <http://www.ow2.org/>
|
||||
Copyright (c) 1999-2009, OW2 Consortium <https://www.ow2.org/>
|
||||
|
||||
|
||||
>>> CGLIB 3.0 (cglib:cglib:3.0):
|
||||
|
||||
Per the LICENSE file in the CGLIB JAR distribution downloaded from
|
||||
http://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
|
||||
https://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
|
||||
CGLIB 3.0 is licensed under the Apache License, version 2.0, the text of which
|
||||
is included above.
|
||||
|
||||
@@ -262,7 +262,7 @@ other similar licenses that require the source code and/or modifications to
|
||||
source code to be made available (as would be noted above), you may obtain a
|
||||
copy of the source code corresponding to the binaries for such open source
|
||||
components and modifications thereto, if any, (the "Source Files"), by
|
||||
downloading the Source Files from http://www.springsource.org/download, or by
|
||||
downloading the Source Files from https://www.springsource.org/download, or by
|
||||
sending a request, with your name and address to:
|
||||
|
||||
Pivotal, Inc., 875 Howard St,
|
||||
|
||||
2
src/docs/dist/readme.txt
vendored
2
src/docs/dist/readme.txt
vendored
@@ -6,7 +6,7 @@ https://github.com/spring-projects/spring-framework/releases
|
||||
|
||||
Please consult the documentation located within the 'docs/spring-framework-reference'
|
||||
directory of this release and also visit the official Spring Framework home at
|
||||
http://projects.spring.io/spring-framework/
|
||||
https://projects.spring.io/spring-framework/
|
||||
|
||||
There you will find links to the forum, issue tracker, and other resources.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:foo="http://www.foo.com/schema/component"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.foo.com/schema/component http://www.foo.com/schema/component/component.xsd">
|
||||
|
||||
<foo:component id="bionic-family" name="Bionic-1">
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
|
||||
|
||||
<aop:config>
|
||||
<aop:advisor advice-ref="advice" pointcut="execution(* *..ITestBean.*(..))"/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "https://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
|
||||
<!--
|
||||
Common bean definitions for auto proxy creator tests.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xsi:schemaLocation=
|
||||
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
|
||||
"http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd"
|
||||
default-autowire="byType">
|
||||
|
||||
<context:component-scan base-package="org.springframework.context.annotation">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
|
||||
profile="dev">
|
||||
|
||||
<bean id="devBean" class="java.lang.Object"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"
|
||||
profile="prod">
|
||||
|
||||
<bean id="prodBean" class="java.lang.Object"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="envAwareBean" class="org.springframework.core.env.EnvironmentSystemIntegrationTests$EnvironmentAwareBean"/>
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:cache="http://www.springframework.org/schema/cache"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/cache https://www.springframework.org/schema/cache/spring-cache.xsd">
|
||||
|
||||
<cache:annotation-driven/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user