diff --git a/CONTRIBUTING-DOCUMENTATION.adoc b/CONTRIBUTING-DOCUMENTATION.adoc index 6b51e5d7d22..5133dbe17da 100644 --- a/CONTRIBUTING-DOCUMENTATION.adoc +++ b/CONTRIBUTING-DOCUMENTATION.adoc @@ -1,6 +1,6 @@ = How to contribute to the reference -The Spring Framework reference now uses http://asciidoctor.org/[asciidoctor]. This +The Spring Framework reference now uses https://asciidoctor.org/[asciidoctor]. This document describes how to contribute documentation updates. == Building with Gradle @@ -18,7 +18,7 @@ One of the nice features about using asciidoctor is the support for live editing You will find a Guardfile already present at `spring-framework/src/asciidoc/Guardfile`. Make sure first to follow the setup instructions within the -http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Editing AsciiDoc with Live Preview] +https://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Editing AsciiDoc with Live Preview] document. Once you have done that, there are additional gems to install to make it work (assuming that you are using http://livereload.com/[LiveReload]): @@ -45,7 +45,7 @@ Some notes on documentation * Documentation is wrapped at 90 chars, ensure that you manually wrap your edits * Tabs are used for indentation, do not use spaces * Follow the existing style when inserting `source` blocks -* http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor Quick Reference] -* http://asciidoctor.org/docs/user-manual/[Asciidoctor Manual] -* http://asciidoctor.org/docs/asciidoc-writers-guide/[Asciidoctor Writers Guide] +* https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor Quick Reference] +* https://asciidoctor.org/docs/user-manual/[Asciidoctor Manual] +* https://asciidoctor.org/docs/asciidoc-writers-guide/[Asciidoctor Writers Guide] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d901d803ea..142885c77d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -305,12 +305,12 @@ Note that you can always force push (`git push -f`) reworked / rebased commits against the branch used to submit your pull request. In other words, you do not need to issue a new pull request when asked to make changes. -[help documentation]: http://help.github.com/send-pull-requests +[help documentation]: https://help.github.com/send-pull-requests [JIRA issue tracker]: https://jira.spring.io/browse/SPR [spring-framework-contrib]: https://groups.google.com/forum/#!forum/spring-framework-contrib [Spring ICLA form]: https://support.springsource.com/spring_committer_signup [fork-and-edit]: https://github.com/blog/844-forking-with-the-edit-button [Spring Framework Code Style]: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Code-Style -[Rewriting History section of Pro Git]: http://git-scm.com/book/en/Git-Tools-Rewriting-History -[Commit Guidelines section of Pro Git]: http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines +[Rewriting History section of Pro Git]: https://git-scm.com/book/en/Git-Tools-Rewriting-History +[Commit Guidelines section of Pro Git]: https://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project#Commit-Guidelines [building from source]: https://github.com/spring-projects/spring-framework#building-from-source diff --git a/README.md b/README.md index ffece4a39ff..bb5ec516d54 100644 --- a/README.md +++ b/README.md @@ -70,29 +70,29 @@ The Spring Framework is released under version 2.0 of the [Apache License][]. [Spring Integration]: https://github.com/spring-projects/spring-integration [Spring Batch]: https://github.com/spring-projects/spring-batch -[family of projects]: http://spring.io/projects +[family of projects]: https://spring.io/projects [Spring organization]: https://github.com/spring-projects [downloading Spring artifacts]: https://github.com/spring-projects/spring-framework/wiki/Downloading-Spring-artifacts [building a distribution with dependencies]: https://github.com/spring-projects/spring-framework/wiki/Building-a-distribution-with-dependencies -[Javadoc]: http://docs.spring.io/spring-framework/docs/current/javadoc-api/ -[reference docs]: http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/ -[spring tags]: http://spring.io/questions -[Stack Overflow]: http://stackoverflow.com/faq -[Commercial support]: http://spring.io/services +[Javadoc]: https://docs.spring.io/spring-framework/docs/current/javadoc-api/ +[reference docs]: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/ +[spring tags]: https://spring.io/questions +[Stack Overflow]: https://stackoverflow.com/faq +[Commercial support]: https://spring.io/services [Spring Framework JIRA]: https://jira.spring.io/browse/SPR [the lifecycle of an issue]: https://github.com/spring-projects/spring-framework/wiki/The-Lifecycle-of-an-Issue [spring-framework-issues]: https://github.com/spring-projects/spring-framework-issues#readme [readme]: https://github.com/spring-projects/spring-framework-issues#readme -[Gradle]: http://gradle.org -[`./gradlew`]: http://vimeo.com/34436402 -[Git]: http://help.github.com/set-up-git-redirect -[JDK8 build]: http://www.oracle.com/technetwork/java/javase/downloads +[Gradle]: https://gradle.org +[`./gradlew`]: https://vimeo.com/34436402 +[Git]: https://help.github.com/set-up-git-redirect +[JDK8 build]: https://www.oracle.com/technetwork/java/javase/downloads [Gradle build and release FAQ]: https://github.com/spring-projects/spring-framework/wiki/Gradle-build-and-release-FAQ -[Pull requests]: http://help.github.com/send-pull-requests +[Pull requests]: https://help.github.com/send-pull-requests [contributor guidelines]: https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.md [@SpringFramework]: https://twitter.com/springframework [@SpringCentral]: https://twitter.com/springcentral [team members]: https://twitter.com/springframework/lists/team/members -[The Spring Blog]: http://spring.io/blog/ -[news feed]: http://spring.io/blog/category/news +[The Spring Blog]: https://spring.io/blog/ +[news feed]: https://spring.io/blog/category/news [Apache License]: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/gradle/jdiff/README.txt b/gradle/jdiff/README.txt index 9f7529e2864..ed49a1b9231 100644 --- a/gradle/jdiff/README.txt +++ b/gradle/jdiff/README.txt @@ -11,7 +11,7 @@ difference between two public Java APIs. The file jdiff.html contains the reference page for JDiff. The latest version of JDiff can be downloaded at: -http://sourceforge.net/projects/javadiff +https://sourceforge.net/projects/javadiff To use the Ant task on your own project, see example.xml. More examples of using JDiff to compare the public APIs of J2SE1.3 and J2SE1.4 can @@ -40,7 +40,7 @@ Acknowledgements JDiff uses Stuart D. Gathman's Java translation of Gene Myers' O(ND) difference algorithm. -JDiff uses Xerces 1.4.2 from http://www.apache.org. +JDiff uses Xerces 1.4.2 from https://www.apache.org. JDiff also includes a script to use the classdoc application from http://classdoc.sourceforge.net or http://www.jensgulden.de, by Jens @@ -56,4 +56,4 @@ much of this work. Footnote: If you are looking for a generalized diff tool for XML, try diffmk from -http://wwws.sun.com/software/xml/developers/diffmk/ +https://wwws.sun.com/software/xml/developers/diffmk/ diff --git a/gradle/jdiff/jdiff.html b/gradle/jdiff/jdiff.html index 5c46f967b9e..d242fb8a495 100644 --- a/gradle/jdiff/jdiff.html +++ b/gradle/jdiff/jdiff.html @@ -7,10 +7,10 @@ - - +
+ JDiff Logo SourceForge Logo SourceForge Logo
@@ -21,7 +21,7 @@ width="88" height="31" border="0" alt="JDiff Logo">
JDiff is a Javadoc doclet which generates an +href="https://java.sun.com/j2se/javadoc">doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared. This is very useful @@ -312,7 +312,7 @@ the HTML output to the given directory. -javadocnew <javadoc files location for the new API>
The location of existing Javadoc files - for the new API, e.g. "http://java.sun.com/j2se/1.5.0/docs/api/" for the + for the new API, e.g. "https://java.sun.com/j2se/1.5.0/docs/api/" for the public documentation for J2SE1.5.0. The default value is "../", which implies that the documentation directory generated by Javadoc is at the same level as the "changes.html" file generated by JDiff. Slashes are always @@ -325,7 +325,7 @@ the HTML output to the given directory.
-javadocold <javadoc files location for the old API>
The location of existing - Javadoc files for the old API, e.g. "http://java.sun.com/j2se/1.5.0/docs/API/" + Javadoc files for the old API, e.g. "https://java.sun.com/j2se/1.5.0/docs/API/" for the public documentation for J2SE1.5.0. The default value is null, which results in no links to Javadoc-generated documentation for the previous release. Slashes are always forward in the argument, since this is an HTML @@ -426,7 +426,7 @@ the HTML output to the given directory. -showallchanges
If this argument is used, JDiff will show changes in - native and synchronized modifiers. See here for why these are not shown by default. + native and synchronized modifiers. See here for why these are not shown by default.
@@ -547,7 +547,7 @@ moved to the end of the file and placed inside XML comments.
The text which is added can be HTML text if necessary, but if the HTML is incorrect, JDiff may fail to read the comments file and exit. Note that - the required HTML is in fact XHTML. Since this HTML is stored in an XML document, single tags without their closing ("slash") element are not permitted. + the required HTML is in fact XHTML. Since this HTML is stored in an XML document, single tags without their closing ("slash") element are not permitted. For example, most browsers permit HTML which looks like "<p>Here is some text.", with no closing tag. XML requires that either a closing tag exists ("</p>"), or that the single tag is closed, e.g. "<p/>Here is some text.". @@ -988,7 +988,7 @@ it can tell you how the content has changed. Nor does it compare what the methods in an API do; if JDiff could tell you what had changed about the way two versions of an API execute, the Halting +href="https://en.wikipedia.org/wiki/Halting_Problem">Halting Problem would be solved, and our lives would be very different.
  • On a P3 450MHz machine, to scan all of the J2SE Java and javax packages and generate XML takes about 2 minutes @@ -1002,14 +1002,14 @@ per version. To generate a report from the XML files takes about 30s
  • diff --git a/import-into-idea.md b/import-into-idea.md index 64326ef81a0..d280d460dad 100644 --- a/import-into-idea.md +++ b/import-into-idea.md @@ -14,7 +14,7 @@ _Within your locally cloned spring-framework working directory:_ 1. `spring-oxm` should be pre-compiled since it's using repackaged dependencies (see *RepackJar tasks) 2. `spring-aspects` does not compile out of the box due to references to aspect types unknown to IDEA. -See http://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the 'spring-aspects' +See https://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the 'spring-aspects' should be excluded from the overall project to avoid compilation errors. 3. While all JUnit tests pass from the command line with Gradle, many will fail when run from IDEA. Resolving this is a work in progress. If attempting to run all JUnit tests from within IDEA, you will @@ -28,6 +28,6 @@ You'll notice these files are already intentionally in .gitignore. The same poli ## FAQ -Q. What about IDEA's own [Gradle support](http://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)? +Q. What about IDEA's own [Gradle support](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)? -A. Keep an eye on http://youtrack.jetbrains.com/issue/IDEA-53476 +A. Keep an eye on https://youtrack.jetbrains.com/issue/IDEA-53476 diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd index bc3235b9d9d..bd29e4316d0 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd @@ -7,8 +7,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + } XML. {@link #getPropertyDescriptors()} returns all * existing property descriptors from the wrapped {@code BeanInfo} as well any added for * non-void returning setters. Both standard ("non-indexed") and - * + * * indexed properties are fully supported. * * @author Chris Beams @@ -137,7 +137,7 @@ class ExtendedBeanInfo implements BeanInfo { } // Sort non-void returning write methods to guard against the ill effects of // non-deterministic sorting of methods returned from Class#getDeclaredMethods - // under JDK 7. See http://bugs.sun.com/view_bug.do?bug_id=7023180 + // under JDK 7. See https://bugs.java.com/view_bug.do?bug_id=7023180 Collections.sort(matches, new Comparator() { @Override public int compare(Method m1, Method m2) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java index e204d426fcd..1434cfe2129 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java @@ -111,7 +111,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; * {@code beanRefFactory.xml} definition file: * *
    <?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">
      *
      * <beans>
      *
    @@ -141,7 +141,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
      * Another relatively simple variation of the {@code beanRefFactory.xml} definition file could be:
      *
      * 
    <?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">
      *
      * <beans>
      *
    @@ -200,7 +200,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
      * 

    {@code beanRefFactory.xml} file inside jar for util module: * *

    <?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">
      *
      * <beans>
      *   <bean id="com.mycompany.myapp.util" lazy-init="true"
    @@ -215,7 +215,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
      * {@code beanRefFactory.xml} file inside jar for data-access module:
    * *
    <?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">
      *
      * <beans>
      *   <!-- child of util -->
    @@ -234,7 +234,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
      * {@code beanRefFactory.xml} file inside jar for services module:
      *
      * 
    <?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">
      *
      * <beans>
      *   <!-- child of data-access -->
    @@ -255,7 +255,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
      * a name known to this module:
      *
      * 
    <?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">
      *
      * <beans>
      *   <!-- define an alias for "com.mycompany.myapp.services" -->
    diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
    index 5f303858907..c0c3bae2949 100644
    --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
    +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
    @@ -67,11 +67,11 @@ public abstract class YamlProcessor {
     	 * to properties before the match is made. E.g.
     	 * 
     	 * environment: dev
    -	 * url: http://dev.bar.com
    +	 * url: https://dev.bar.com
     	 * name: Developer Setup
     	 * ---
     	 * environment: prod
    -	 * url:http://foo.bar.com
    +	 * url:https://foo.bar.com
     	 * name: My Cool App
     	 * 
    * when mapped with @@ -79,9 +79,9 @@ public abstract class YamlProcessor { * would end up as *
     	 * environment=prod
    -	 * url=http://foo.bar.com
    +	 * url=https://foo.bar.com
     	 * name=My Cool App
    -	 * url=http://dev.bar.com
    +	 * url=https://dev.bar.com
     	 * 
    * @param matchers a map of keys to value patterns (regular expressions) */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBean.java index 9f90197b201..9e8329a0a2b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBean.java @@ -32,19 +32,19 @@ import org.springframework.beans.factory.InitializingBean; *
      * environments:
      *   dev:
    - *     url: http://dev.bar.com
    + *     url: https://dev.bar.com
      *     name: Developer Setup
      *   prod:
    - *     url: http://foo.bar.com
    + *     url: https://foo.bar.com
      *     name: My Cool App
      * 
    * * is transformed into these Properties: * *
    - * environments.dev.url=http://dev.bar.com
    + * environments.dev.url=https://dev.bar.com
      * environments.dev.name=Developer Setup
    - * environments.prod.url=http://foo.bar.com
    + * environments.prod.url=https://foo.bar.com
      * environments.prod.name=My Cool App
      * 
    * diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java index 0834baa9e5e..318ed880932 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java @@ -6,7 +6,7 @@ * Builds on the org.springframework.beans package. * *

    This package and related packages are discussed in Chapter 11 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.beans.factory; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java index 2754e7806cb..39c14bdd8cf 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java @@ -1447,7 +1447,7 @@ public class BeanDefinitionParserDelegate { if (handler != null) { return handler.decorate(node, originalDef, new ParserContext(this.readerContext, this, containingBd)); } - else if (namespaceUri != null && namespaceUri.startsWith("http://www.springframework.org/")) { + else if (namespaceUri != null && namespaceUri.startsWith("https://www.springframework.org/")) { error("Unable to locate Spring NamespaceHandler for XML schema namespace [" + namespaceUri + "]", node); } else { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java index 5f3edffff8a..9d8aaa8c203 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java @@ -33,7 +33,7 @@ import org.springframework.core.io.Resource; *

    Fetches "spring-beans-2.0.dtd" from the class path resource * "/org/springframework/beans/factory/xml/spring-beans-2.0.dtd", * no matter whether specified as some local URL that includes "spring-beans" - * in the DTD name or as "http://www.springframework.org/dtd/spring-beans-2.0.dtd". + * in the DTD name or as "https://www.springframework.org/dtd/spring-beans-2.0.dtd". * * @author Juergen Hoeller * @author Colin Sampaleanu diff --git a/spring-beans/src/main/java/org/springframework/beans/package-info.java b/spring-beans/src/main/java/org/springframework/beans/package-info.java index 6b4466dbea8..d878846387c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/package-info.java @@ -6,7 +6,7 @@ * singly or in bulk. * *

    The classes in this package are discussed in Chapter 11 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.beans; diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-2.0.dtd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-2.0.dtd index edb9aca7b3c..669bd05f43f 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-2.0.dtd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-2.0.dtd @@ -34,7 +34,7 @@ XML documents that conform to this DTD should declare the following doctype: + "https://www.springframework.org/dtd/spring-beans-2.0.dtd"> --> diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.0.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.0.xsd index 509c0eeaeee..e5be655ccaf 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.0.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.5.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.5.xsd index eb04ecff4a5..b76bfe3d799 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.5.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-2.5.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.0.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.0.xsd index 287e31ba81c..ad4c9daceed 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.0.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.1.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.1.xsd index 9b5774a46c4..4cf6f846ec8 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.1.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd index f7a754aa6c2..e24d757f64a 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.0.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.0.xsd index 40f34f9f216..939c3fd2549 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.0.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.1.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.1.xsd index 836c4a95b0c..94499792147 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.1.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.2.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.2.xsd index 67651bcee17..8361f9ba901 100644 --- a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.2.xsd +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-4.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java index 5099a6cec7a..8dc92e7eec1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java @@ -572,7 +572,7 @@ public class ExtendedBeanInfoTests { * IntrospectionException regarding a "type mismatch between indexed and non-indexed * methods" intermittently (approximately one out of every four times) under JDK 7 * due to non-deterministic results from {@link Class#getDeclaredMethods()}. - * See http://bugs.sun.com/view_bug.do?bug_id=7023180 + * See https://bugs.java.com/view_bug.do?bug_id=7023180 * @see #cornerSpr9702() */ @Test diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index f0bd263ebdf..b2ccb6f5fca 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -1654,7 +1654,7 @@ public class DefaultListableBeanFactoryTests { /** * Verifies that a dependency on a {@link FactoryBean} can be autowired * by type, specifically addressing the JIRA issue raised in SPR-4040. */ @Test diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index 185a1871f05..0cacbea69a3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -1207,7 +1207,7 @@ public class AutowiredAnnotationBeanPostProcessorTests { * Verifies that a dependency on a {@link FactoryBean} can be autowired via * {@link Autowired @Autowired}, specifically addressing the JIRA issue * raised in SPR-4040. */ @Test diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java index 4b86e8d0752..1d58f06ea45 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java @@ -551,7 +551,7 @@ public class InjectAnnotationBeanPostProcessorTests { * Verifies that a dependency on a {@link org.springframework.beans.factory.FactoryBean} can be autowired via * {@link org.springframework.beans.factory.annotation.Autowired @Inject}, specifically addressing the JIRA issue * raised in SPR-4040. */ @Test diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index 377d77907b5..f989ac071c5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -650,7 +650,7 @@ public class BeanFactoryGenericsTests { new ClassPathResource("genericBeanTests.xml", getClass())); UrlSet us = (UrlSet) bf.getBean("setBean"); assertEquals(1, us.size()); - assertEquals(new URL("http://www.springframework.org"), us.iterator().next()); + assertEquals(new URL("https://www.springframework.org"), us.iterator().next()); } /** diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java index 75fd185bcfa..ed72c6fedcc 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java @@ -52,22 +52,22 @@ public class URIEditorTests { @Test public void standardURL() throws Exception { - doTestURI("http://www.springframework.org"); + doTestURI("https://www.springframework.org"); } @Test public void standardURLWithFragment() throws Exception { - doTestURI("http://www.springframework.org#1"); + doTestURI("https://www.springframework.org#1"); } @Test public void standardURLWithWhitespace() throws Exception { PropertyEditor uriEditor = new URIEditor(); - uriEditor.setAsText(" http://www.springframework.org "); + uriEditor.setAsText(" https://www.springframework.org "); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; - assertEquals("http://www.springframework.org", uri.toString()); + assertEquals("https://www.springframework.org", uri.toString()); } @Test @@ -122,23 +122,23 @@ public class URIEditorTests { @Test public void encodeURI() throws Exception { PropertyEditor uriEditor = new URIEditor(); - uriEditor.setAsText("http://example.com/spaces and \u20AC"); + uriEditor.setAsText("https://example.com/spaces and \u20AC"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); - assertEquals("http://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); + assertEquals("https://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); } @Test public void encodeAlreadyEncodedURI() throws Exception { PropertyEditor uriEditor = new URIEditor(false); - uriEditor.setAsText("http://example.com/spaces%20and%20%E2%82%AC"); + uriEditor.setAsText("https://example.com/spaces%20and%20%E2%82%AC"); Object value = uriEditor.getValue(); assertTrue(value instanceof URI); URI uri = (URI) value; assertEquals(uri.toString(), uriEditor.getAsText()); - assertEquals("http://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); + assertEquals("https://example.com/spaces%20and%20%E2%82%AC", uri.toASCIIString()); } } diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java index 29a6dae2ff0..e083f3dfdd6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java @@ -44,7 +44,7 @@ public final class URLEditorTests { @Test public void testStandardURL() throws Exception { PropertyEditor urlEditor = new URLEditor(); - urlEditor.setAsText("http://www.springframework.org"); + urlEditor.setAsText("https://www.springframework.org"); Object value = urlEditor.getValue(); assertTrue(value instanceof URL); URL url = (URL) value; diff --git a/spring-context-support/src/main/java/org/springframework/cache/ehcache/package-info.java b/spring-context-support/src/main/java/org/springframework/cache/ehcache/package-info.java index edb951a4ce5..39d81029a96 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/ehcache/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/cache/ehcache/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the open source cache - * EhCache 2.x, + * EhCache 2.x, * allowing to set up an EhCache CacheManager and Caches * as beans in a Spring context. * diff --git a/spring-context-support/src/main/java/org/springframework/cache/guava/package-info.java b/spring-context-support/src/main/java/org/springframework/cache/guava/package-info.java index 6f892820a98..6668c00c5eb 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/guava/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/cache/guava/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the open source cache in Google's - * Guava library, + * Guava library, * allowing to set up Guava caches within Spring's cache abstraction. */ package org.springframework.cache.guava; diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java index 7fa9d5b587f..d6b298b0d9d 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/MethodInvokingJobDetailFactoryBean.java @@ -116,7 +116,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod * realized through adding the {@code @PersistJobDataAfterExecution} and * {@code @DisallowConcurrentExecution} markers. * More information on stateful versus stateless jobs can be found - * here. + * here. *

    The default setting is to run jobs concurrently. */ public void setConcurrent(boolean concurrent) { diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java index df50ca80d70..a6935a81800 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the open source scheduler - * Quartz, + * Quartz, * allowing to set up Quartz Schedulers, JobDetails and * Triggers as beans in a Spring context. Also provides * convenience classes for implementing Quartz Jobs. diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java index 28fbe3bf516..56b6bba0aba 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for setting up - * FreeMarker + * FreeMarker * within a Spring application context. */ package org.springframework.ui.freemarker; diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java index 36409cf3940..f41e9c1cad2 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for setting up - * Velocity + * Velocity * within a Spring application context. */ package org.springframework.ui.velocity; diff --git a/spring-context-support/src/main/resources/org/springframework/mail/javamail/mime.types b/spring-context-support/src/main/resources/org/springframework/mail/javamail/mime.types index 08b43938d48..1e9ce6776de 100644 --- a/spring-context-support/src/main/resources/org/springframework/mail/javamail/mime.types +++ b/spring-context-support/src/main/resources/org/springframework/mail/javamail/mime.types @@ -47,7 +47,7 @@ video/x-msvideo avi ################################################################################ # # Additional file types adapted from -# http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html +# https://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html # kindly re-licensed to Apache Software License 2.0 by Ian Graham. # ################################################################################ diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java index 487956b5788..95ca35dee33 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java @@ -31,7 +31,7 @@ import org.springframework.aop.support.DefaultPointcutAdvisor; * target implements. Exists primarily for third-party framework integration. * Users should favor the {@code cache:} XML namespace * {@link org.springframework.cache.annotation.Cacheable @Cacheable} annotation. - * See the declarative annotation-based caching section + * See the declarative annotation-based caching section * of the Spring reference documentation for more information. * * @author Costin Leau diff --git a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java index 1e8b5c043a7..8003c999b95 100644 --- a/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java +++ b/spring-context/src/main/java/org/springframework/context/support/SimpleThreadScope.java @@ -41,7 +41,7 @@ import org.springframework.core.NamedThreadLocal; * *

    For an implementation of a thread-based {@code Scope} with support for * destruction callbacks, refer to the - * + * * Spring by Example Custom Thread Scope Module. * *

    Thanks to Eugene Kuleshov for submitting the original prototype for a thread scope! diff --git a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java index 523280e2e41..90f3c27142d 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java @@ -12,7 +12,7 @@ * affecting code using business objects. * *

    The motivation for the classes in this package are discussed in Chapter 11 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). * *

    However, the implementation and naming of classes in this package has changed. diff --git a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java index 49adace5743..55be70d9e44 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/WebSphereMBeanServerFactoryBean.java @@ -34,8 +34,8 @@ import org.springframework.jmx.MBeanServerNotFoundException; * which uses standard JMX 1.2 API to access the platform's MBeanServer. * *

    See the javadocs for WebSphere's - * {@code AdminServiceFactory} - * and {@code MBeanFactory}. + * {@code AdminServiceFactory} + * and {@code MBeanFactory}. * * @author Juergen Hoeller * @author Rob Harrop diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiPropertySource.java b/spring-context/src/main/java/org/springframework/jndi/JndiPropertySource.java index 7cf7870b1cf..1761e979dba 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiPropertySource.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiPropertySource.java @@ -28,7 +28,7 @@ import org.springframework.core.env.PropertySource; * {@link JndiLocatorDelegate#setResourceRef(boolean) "resourceRef"} property set to * {@code true}, meaning that names looked up will automatically be prefixed with * "java:comp/env/" in alignment with published - * JNDI + * JNDI * naming conventions. To override this setting or to change the prefix, manually * configure a {@code JndiLocatorDelegate} and provide it to one of the constructors here * that accepts it. The same applies when providing custom JNDI properties. These should diff --git a/spring-context/src/main/java/org/springframework/jndi/package-info.java b/spring-context/src/main/java/org/springframework/jndi/package-info.java index 55bbba27ce4..dc4b5ad2c92 100644 --- a/spring-context/src/main/java/org/springframework/jndi/package-info.java +++ b/spring-context/src/main/java/org/springframework/jndi/package-info.java @@ -4,7 +4,7 @@ * and provide useful superclasses for JNDI access classes. * *

    The classes in this package are discussed in Chapter 11 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.jndi; diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java index ca74697904c..81dcc1ef691 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java @@ -179,7 +179,7 @@ public abstract class RmiClientInterceptorUtils { * connection failure. *

    This is relevant on the IBM JVM, in particular for WebSphere EJB clients. *

    See the - * IBM website + * IBM website * for details. * @param ex the RMI exception to check */ diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java index ccd8786d3c9..3aee58d71a9 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ForkJoinPoolFactoryBean.java @@ -30,7 +30,7 @@ import org.springframework.lang.UsesJava7; * (ideally on the VM bootstrap classpath). * *

    For details on the ForkJoinPool API and its use with RecursiveActions, see the - * JDK 7 javadoc. + * JDK 7 javadoc. * *

    {@code jsr166.jar}, containing {@code java.util.concurrent} updates for Java 6, can be obtained * from the concurrency interest website. diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java index c096ee8fbc6..f7953ae9d8e 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java @@ -30,7 +30,7 @@ import org.springframework.util.StringUtils; /** * Date sequence generator for a - * Crontab pattern, + * Crontab pattern, * allowing clients to specify a pattern that the sequence matches. * *

    The pattern is a list of six single space-separated fields: representing diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java b/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java index a8adbca6c95..d52382519d1 100644 --- a/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java @@ -1,7 +1,7 @@ /** * Package providing integration of * BeanShell - * (and BeanShell2) + * (and BeanShell2) * into Spring's scripting infrastructure. */ package org.springframework.scripting.bsh; diff --git a/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java b/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java index 78d470922a4..5e283dba41e 100644 --- a/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java @@ -1,6 +1,6 @@ /** * Package providing integration of - * JRuby + * JRuby * into Spring's scripting infrastructure. */ package org.springframework.scripting.jruby; diff --git a/spring-context/src/main/resources/org/springframework/cache/config/spring-cache-3.1.xsd b/spring-context/src/main/resources/org/springframework/cache/config/spring-cache-3.1.xsd index eab936d9ab9..377d6c46524 100644 --- a/spring-context/src/main/resources/org/springframework/cache/config/spring-cache-3.1.xsd +++ b/spring-context/src/main/resources/org/springframework/cache/config/spring-cache-3.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.1.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.1.xsd index 55a20bb00e8..9b914645972 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.1.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.1.xsd @@ -13,8 +13,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.2.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.2.xsd index d76fab78968..5e7575d8ca3 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.2.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.2.xsd @@ -13,8 +13,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.0.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.0.xsd index aaebc72957c..c74efa95106 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.0.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.0.xsd @@ -13,8 +13,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.1.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.1.xsd index c4304fa185e..5c6c9126ef2 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.1.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.1.xsd @@ -13,8 +13,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.2.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.2.xsd index 624d848ca4c..2a8ad537113 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.2.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-4.2.xsd @@ -13,8 +13,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.0.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.0.xsd index 7df96963bea..38662e002ea 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.0.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.0.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.5.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.5.xsd index ef231e18681..cd1713e8322 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.5.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-2.5.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.0.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.0.xsd index b1094e4e6da..786aa4a5fa4 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.0.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.0.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.1.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.1.xsd index fb785a1b3a4..0acb7f38b8f 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.1.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.1.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.2.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.2.xsd index 719b875a918..fc8731bd9ce 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.2.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-3.2.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.0.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.0.xsd index 6b45d5e710e..ae89dc666e0 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.0.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.0.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.1.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.1.xsd index 5d6e222523e..8adb087bce3 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.1.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.1.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.2.xsd b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.2.xsd index 60c219019e7..1c2809e80e1 100644 --- a/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.2.xsd +++ b/spring-context/src/main/resources/org/springframework/scripting/config/spring-lang-4.2.xsd @@ -15,8 +15,8 @@ ]]> - - + + diff --git a/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java b/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java index 6622fe85383..e9ed8a2ed7d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java @@ -38,7 +38,7 @@ import static org.junit.Assert.*; *

    * JUnit-3.8-based unit test which verifies expected init and * destroy bean lifecycle behavior as requested in SPR-3775. *

    *

    diff --git a/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java b/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java index 9e3e239ffe4..9a36d73d9be 100644 --- a/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/AbstractMBeanServerTests.java @@ -42,7 +42,7 @@ import static org.junit.Assert.*; * {@code -DtestGroups=jmxmp}). * *

    If you run into the "Unsupported protocol: jmxmp" error, you will need to - * download the JMX + * download the JMX * Remote API 1.0.1_04 Reference Implementation from Oracle and extract * {@code jmxremote_optional.jar} into your classpath, for example in the {@code lib/ext} * folder of your JVM. diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java index 395b106701d..f8fbdd64e9c 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java @@ -74,7 +74,7 @@ public class MethodExclusionMBeanInfoAssemblerTests extends AbstractJmxAssembler } /* - * http://opensource.atlassian.com/projects/spring/browse/SPR-2754 + * https://opensource.atlassian.com/projects/spring/browse/SPR-2754 */ @Test public void testIsNotIgnoredDoesntIgnoreUnspecifiedBeanMethods() throws Exception { diff --git a/spring-context/src/test/java/org/springframework/scripting/jruby/PrimitiveAdder.java b/spring-context/src/test/java/org/springframework/scripting/jruby/PrimitiveAdder.java index 1110206e149..b9377b3877a 100644 --- a/spring-context/src/test/java/org/springframework/scripting/jruby/PrimitiveAdder.java +++ b/spring-context/src/test/java/org/springframework/scripting/jruby/PrimitiveAdder.java @@ -1,7 +1,7 @@ package org.springframework.scripting.jruby; /** - * http://opensource.atlassian.com/projects/spring/browse/SPR-3026 + * https://opensource.atlassian.com/projects/spring/browse/SPR-3026 * * @author Rick Evans */ diff --git a/spring-context/src/test/java/org/springframework/scripting/jruby/WrapperAdder.java b/spring-context/src/test/java/org/springframework/scripting/jruby/WrapperAdder.java index a7f613bd4be..854d20faff2 100644 --- a/spring-context/src/test/java/org/springframework/scripting/jruby/WrapperAdder.java +++ b/spring-context/src/test/java/org/springframework/scripting/jruby/WrapperAdder.java @@ -19,7 +19,7 @@ package org.springframework.scripting.jruby; import java.util.Map; /** - * http://opensource.atlassian.com/projects/spring/browse/SPR-3038 + * https://opensource.atlassian.com/projects/spring/browse/SPR-3038 * * @author Rick Evans */ diff --git a/spring-core/src/main/java/org/springframework/asm/package-info.java b/spring-core/src/main/java/org/springframework/asm/package-info.java index 98c9a0d8ca8..423d2860b26 100644 --- a/spring-core/src/main/java/org/springframework/asm/package-info.java +++ b/spring-core/src/main/java/org/springframework/asm/package-info.java @@ -1,6 +1,6 @@ /** * Spring's repackaging of - * org.objectweb.asm 5.0 + * org.objectweb.asm 5.0 * (for internal use only). * *

    This repackaging technique avoids any potential conflicts with @@ -9,7 +9,7 @@ * *

    As this repackaging happens at the class file level, sources * and javadocs are not available here. See the original ObjectWeb - * ASM 5.0 javadocs + * ASM 5.0 javadocs * for details when working with these classes. */ package org.springframework.asm; diff --git a/spring-core/src/main/java/org/springframework/cglib/package-info.java b/spring-core/src/main/java/org/springframework/cglib/package-info.java index 78ef762beed..c2280f974e9 100644 --- a/spring-core/src/main/java/org/springframework/cglib/package-info.java +++ b/spring-core/src/main/java/org/springframework/cglib/package-info.java @@ -9,7 +9,7 @@ * *

    As this repackaging happens at the class file level, sources * and javadocs are not available here. See the original - * CGLIB 3.2 javadocs + * CGLIB 3.2 javadocs * for details when working with these classes. */ package org.springframework.cglib; diff --git a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java index 8d946c6845a..a77a0380ac0 100644 --- a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java +++ b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java @@ -36,7 +36,7 @@ import org.springframework.util.ReflectionUtils; * When attempting to locate annotations on {@link Method Methods}, it is wise to check * for bridge {@link Method Methods} as appropriate and find the bridged {@link Method}. * - *

    See + *

    See * The Java Language Specification for more details on the use of bridge methods. * * @author Rob Harrop @@ -203,8 +203,8 @@ public abstract class BridgeMethodResolver { /** * Compare the signatures of the bridge method and the method which it bridges. If * the parameter and return types are the same, it is a 'visibility' bridge method - * introduced in Java 6 to fix http://bugs.sun.com/view_bug.do?bug_id=6342411. - * See also http://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html + * introduced in Java 6 to fix https://bugs.java.com/view_bug.do?bug_id=6342411. + * See also https://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html * @return whether signatures match as described */ public static boolean isVisibilityBridgeMethodPair(Method bridgeMethod, Method bridgedMethod) { diff --git a/spring-core/src/main/java/org/springframework/core/ParameterizedTypeReference.java b/spring-core/src/main/java/org/springframework/core/ParameterizedTypeReference.java index ed0263c89bf..c49cae6a1a1 100644 --- a/spring-core/src/main/java/org/springframework/core/ParameterizedTypeReference.java +++ b/spring-core/src/main/java/org/springframework/core/ParameterizedTypeReference.java @@ -37,7 +37,7 @@ import org.springframework.util.Assert; * @author Arjen Poutsma * @author Rossen Stoyanchev * @since 3.2 - * @see Neal Gafter on Super Type Tokens + * @see Neal Gafter on Super Type Tokens */ public abstract class ParameterizedTypeReference { diff --git a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java index 602ac06bd62..6b466088b96 100644 --- a/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java +++ b/spring-core/src/main/java/org/springframework/util/AntPathMatcher.java @@ -28,7 +28,7 @@ import java.util.regex.Pattern; /** * {@link PathMatcher} implementation for Ant-style path patterns. * - *

    Part of this mapping code has been kindly borrowed from Apache Ant. + *

    Part of this mapping code has been kindly borrowed from Apache Ant. * *

    The mapping matches URLs using the following rules:
    *

      diff --git a/spring-core/src/main/java/org/springframework/util/Assert.java b/spring-core/src/main/java/org/springframework/util/Assert.java index 78db1a2c499..d5cb0847f68 100644 --- a/spring-core/src/main/java/org/springframework/util/Assert.java +++ b/spring-core/src/main/java/org/springframework/util/Assert.java @@ -43,7 +43,7 @@ import java.util.Map; * Assert.isTrue(i > 0, "The value must be greater than zero");
    * *

    Mainly for internal use within the framework; consider - * Apache's Commons Lang + * Apache's Commons Lang * for a more comprehensive suite of {@code String} utilities. * * @author Keith Donald diff --git a/spring-core/src/main/java/org/springframework/util/DigestUtils.java b/spring-core/src/main/java/org/springframework/util/DigestUtils.java index 6745107caf7..e7633e0afed 100644 --- a/spring-core/src/main/java/org/springframework/util/DigestUtils.java +++ b/spring-core/src/main/java/org/springframework/util/DigestUtils.java @@ -25,7 +25,7 @@ import java.security.NoSuchAlgorithmException; * Miscellaneous methods for calculating digests. * *

    Mainly for internal use within the framework; consider - * Apache Commons Codec + * Apache Commons Codec * for a more comprehensive suite of digest utilities. * * @author Arjen Poutsma diff --git a/spring-core/src/main/java/org/springframework/util/MimeType.java b/spring-core/src/main/java/org/springframework/util/MimeType.java index 97af97eee68..929d58e7361 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeType.java +++ b/spring-core/src/main/java/org/springframework/util/MimeType.java @@ -177,7 +177,7 @@ public class MimeType implements Comparable, Serializable { * Checks the given token string for illegal characters, as defined in RFC 2616, * section 2.2. * @throws IllegalArgumentException in case of illegal characters - * @see HTTP 1.1, section 2.2 + * @see HTTP 1.1, section 2.2 */ private void checkToken(String token) { for (int i = 0; i < token.length(); i++ ) { diff --git a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java index bfe29d27643..0e90bcc84f6 100644 --- a/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java +++ b/spring-core/src/main/java/org/springframework/util/MimeTypeUtils.java @@ -322,7 +322,7 @@ public abstract class MimeTypeUtils { *

    audio/basic == text/html
    audio/basic == * audio/wave
    * @param mimeTypes the list of mime types to be sorted - * @see HTTP 1.1: Semantics + * @see HTTP 1.1: Semantics * and Content, section 5.3.2 */ public static void sortBySpecificity(List mimeTypes) { diff --git a/spring-core/src/main/java/org/springframework/util/StringUtils.java b/spring-core/src/main/java/org/springframework/util/StringUtils.java index 76672d1f4f9..f2a16dbd827 100644 --- a/spring-core/src/main/java/org/springframework/util/StringUtils.java +++ b/spring-core/src/main/java/org/springframework/util/StringUtils.java @@ -35,7 +35,7 @@ import java.util.TimeZone; * Miscellaneous {@link String} utility methods. * *

    Mainly for internal use within the framework; consider - * Apache's Commons Lang + * Apache's Commons Lang * for a more comprehensive suite of {@code String} utilities. * *

    This class delivers some simple functionality that should really be diff --git a/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java b/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java index 3904faaac9c..b2bb40edc0d 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java +++ b/spring-core/src/main/java/org/springframework/util/xml/TransformerUtils.java @@ -66,7 +66,7 @@ public abstract class TransformerUtils { transformer.setOutputProperty(OutputKeys.INDENT, "yes"); try { // Xalan-specific, but this is the most common XSLT engine in any case - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(indentAmount)); + transformer.setOutputProperty("{https://xml.apache.org/xslt}indent-amount", String.valueOf(indentAmount)); } catch (IllegalArgumentException ignored) { } diff --git a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java index 2ec796015d7..56102feaaa0 100644 --- a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java @@ -395,12 +395,12 @@ public class StandardEnvironmentTests { SecurityManager securityManager = new SecurityManager() { @Override public void checkPropertiesAccess() { - // see http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperties() + // see https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperties() throw new AccessControlException("Accessing the system properties is disallowed"); } @Override public void checkPropertyAccess(String key) { - // see http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperty(java.lang.String) + // see https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getProperty(java.lang.String) if (DISALLOWED_PROPERTY_NAME.equals(key)) { throw new AccessControlException( String.format("Accessing the system property [%s] is disallowed", DISALLOWED_PROPERTY_NAME)); @@ -462,11 +462,11 @@ public class StandardEnvironmentTests { SecurityManager securityManager = new SecurityManager() { @Override public void checkPermission(Permission perm) { - //see http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv() + //see https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv() if ("getenv.*".equals(perm.getName())) { throw new AccessControlException("Accessing the system environment is disallowed"); } - //see http://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String) + //see https://download.oracle.com/javase/1.5.0/docs/api/java/lang/System.html#getenv(java.lang.String) if (("getenv."+DISALLOWED_PROPERTY_NAME).equals(perm.getName())) { throw new AccessControlException( String.format("Accessing the system environment variable [%s] is disallowed", DISALLOWED_PROPERTY_NAME)); diff --git a/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java b/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java index 64fbfdaad07..e763f21f09d 100644 --- a/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java @@ -180,7 +180,7 @@ public class ResourceTests { @Ignore @Test // this test is quite slow. TODO: re-enable with JUnit categories public void testNonFileResourceExists() throws Exception { - Resource resource = new UrlResource("http://www.springframework.org"); + Resource resource = new UrlResource("https://www.springframework.org"); assertTrue(resource.exists()); } diff --git a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTestCase.java b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTestCase.java index 85f0b45240c..c829b1d905e 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTestCase.java +++ b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTestCase.java @@ -44,7 +44,7 @@ public abstract class AbstractStaxHandlerTestCase { private static final String COMPLEX_XML = "" + - "" + + "" + "characters " + "" + ""; diff --git a/spring-core/src/test/java/org/springframework/util/xml/SimpleNamespaceContextTests.java b/spring-core/src/test/java/org/springframework/util/xml/SimpleNamespaceContextTests.java index 091d4197da4..be297f287eb 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/SimpleNamespaceContextTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/SimpleNamespaceContextTests.java @@ -50,7 +50,7 @@ public class SimpleNamespaceContextTests { @Test public void getNamespaceURI() { context.bindNamespaceUri(XMLConstants.XMLNS_ATTRIBUTE, additionalNamespaceUri); - assertThat("Always returns \"http://www.w3.org/2000/xmlns/\" for \"xmlns\"", + assertThat("Always returns \"https://www.w3.org/2000/xmlns/\" for \"xmlns\"", context.getNamespaceURI(XMLConstants.XMLNS_ATTRIBUTE), is(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)); context.bindNamespaceUri(XMLConstants.XML_NS_PREFIX, additionalNamespaceUri); assertThat("Always returns \"http://www.w3.org/XML/1998/namespace\" for \"xml\"", @@ -76,7 +76,7 @@ public class SimpleNamespaceContextTests { @Test public void getPrefix() { - assertThat("Always returns \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"", + assertThat("Always returns \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"", context.getPrefix(XMLConstants.XMLNS_ATTRIBUTE_NS_URI), is(XMLConstants.XMLNS_ATTRIBUTE)); assertThat("Always returns \"xml\" for \"http://www.w3.org/XML/1998/namespace\"", context.getPrefix(XMLConstants.XML_NS_URI), is(XMLConstants.XML_NS_PREFIX)); @@ -103,7 +103,7 @@ public class SimpleNamespaceContextTests { @Test public void getPrefixes() { - assertThat("Returns only \"xmlns\" for \"http://www.w3.org/2000/xmlns/\"", + assertThat("Returns only \"xmlns\" for \"https://www.w3.org/2000/xmlns/\"", getItemSet(context.getPrefixes(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)), is(makeSet(XMLConstants.XMLNS_ATTRIBUTE))); assertThat("Returns only \"xml\" for \"http://www.w3.org/XML/1998/namespace\"", diff --git a/spring-core/src/test/java/org/springframework/util/xml/TransformerUtilsTests.java b/spring-core/src/test/java/org/springframework/util/xml/TransformerUtilsTests.java index 119ac7b9607..4fe5e1f6e70 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/TransformerUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/TransformerUtilsTests.java @@ -42,7 +42,7 @@ public class TransformerUtilsTests { String indent = transformer.getOutputProperty(OutputKeys.INDENT); assertNotNull(indent); assertEquals("yes", indent); - String indentAmount = transformer.getOutputProperty("{http://xml.apache.org/xslt}indent-amount"); + String indentAmount = transformer.getOutputProperty("{https://xml.apache.org/xslt}indent-amount"); assertNotNull(indentAmount); assertEquals(String.valueOf(TransformerUtils.DEFAULT_INDENT_AMOUNT), indentAmount); } @@ -55,7 +55,7 @@ public class TransformerUtilsTests { String indent = transformer.getOutputProperty(OutputKeys.INDENT); assertNotNull(indent); assertEquals("yes", indent); - String indentAmount = transformer.getOutputProperty("{http://xml.apache.org/xslt}indent-amount"); + String indentAmount = transformer.getOutputProperty("{https://xml.apache.org/xslt}indent-amount"); assertNotNull(indentAmount); assertEquals(indentAmountProperty, indentAmount); } diff --git a/spring-expression/readme.txt b/spring-expression/readme.txt index f374935be6c..ea0720e5961 100644 --- a/spring-expression/readme.txt +++ b/spring-expression/readme.txt @@ -31,7 +31,7 @@ Syntax - Need to agree on a standard date format for 'default' processing of dates. Currently it is: formatter = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss z", Locale.UK); // this is something of this format: "Wed, 4 Jul 2001 12:08:56 GMT" - // http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html + // https://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html - See LiteralTests for Date (4,5,6) - should date take an expression rather than be hardcoded in the grammar to take 2 strings only? - when doing arithmetic, eg. 8.4 / 4 and the user asks for an Integer return type - do we silently coerce or diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java index 90a8e96157a..c9ae44eeeef 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java @@ -31,7 +31,7 @@ import org.springframework.util.NumberUtils; * Implements the {@code multiply} operator. * *

    Conversions and promotions are handled as defined in - * Section 5.6.2 of the + * Section 5.6.2 of the * Java Language Specification, with the addiction of {@code BigDecimal}/{@code BigInteger} management: * *

    If any of the operands is of a reference type, unboxing conversion (Section 5.1.8) diff --git a/spring-framework-bom/spring-framework-bom.txt b/spring-framework-bom/spring-framework-bom.txt index 4799dfae8a5..eebed5a73bd 100644 --- a/spring-framework-bom/spring-framework-bom.txt +++ b/spring-framework-bom/spring-framework-bom.txt @@ -1,4 +1,4 @@ This meta-project is used to generate a bill-of-materials POM that contains the other projects in a dependencyManagement section. - + diff --git a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java index 2323f973840..ad5ed41671d 100644 --- a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java +++ b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java @@ -30,8 +30,8 @@ import org.springframework.instrument.classloading.WeavingTransformer; * to loaded classes without the need to use a VM-wide agent. * *

    To be registered using a - * {@code Loader} tag - * in Tomcat's {@code Context} + * {@code Loader} tag + * in Tomcat's {@code Context} * definition in the {@code server.xml} file, with the Spring-provided "spring-instrument-tomcat.jar" * file deployed into Tomcat's "lib" directory. The required configuration tag looks as follows: * diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java index 0bf0d9705b6..f791b8eaba3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java @@ -53,8 +53,8 @@ import org.springframework.util.ClassUtils; * bean definition to a local DataSource (which is simpler and thus recommended). * *

    If you need a "real" connection pool outside of a J2EE container, consider - * Apache Commons DBCP - * or C3P0. + * Apache Commons DBCP + * or C3P0. * Commons DBCP's BasicDataSource and C3P0's ComboPooledDataSource are full * connection pool beans, supporting the same basic properties as this class * plus specific settings (such as minimal/maximal pool size etc). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java index ea6af514f8d..51bf48ed9b4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SimpleDriverDataSource.java @@ -40,8 +40,8 @@ import org.springframework.util.Assert; * for seamless switching to and from a local DataSource bean like this class. * *

    If you need a "real" connection pool outside of a J2EE container, consider - * Apache Commons DBCP - * or C3P0. + * Apache Commons DBCP + * or C3P0. * Commons DBCP's BasicDataSource and C3P0's ComboPooledDataSource are full * connection pool beans, supporting the same basic properties as this class * plus specific settings (such as minimal/maximal pool size etc). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java index 4f3681e67f8..8b0134bbda3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/WebSphereDataSourceAdapter.java @@ -35,7 +35,7 @@ import org.springframework.util.StringUtils; * *

    Uses IBM-specific API to get a JDBC Connection with a specific isolation * level (and read-only flag) from a WebSphere DataSource - * (IBM code example). + * (IBM code example). * Supports the transaction-specific isolation level exposed by * {@link org.springframework.transaction.support.TransactionSynchronizationManager#getCurrentTransactionIsolationLevel()}. * It's also possible to specify a default isolation level, to be applied when the @@ -147,8 +147,8 @@ public class WebSphereDataSourceAdapter extends IsolationLevelDataSourceAdapter * Create a WebSphere {@code JDBCConnectionSpec} object for the given charateristics. *

    The default implementation uses reflection to apply the given settings. * Can be overridden in subclasses to customize the JDBCConnectionSpec object - * (JDBCConnectionSpec javadoc; - * IBM developerWorks article). + * (JDBCConnectionSpec javadoc; + * IBM developerWorks article). * @param isolationLevel the isolation level to apply (or {@code null} if none) * @param readOnlyFlag the read-only flag to apply (or {@code null} if none) * @param username the username to apply ({@code null} or empty indicates the default) diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java index 1dfc47c03d4..81f2b6984c6 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java @@ -28,10 +28,10 @@ public enum EmbeddedDatabaseType { /** The Hypersonic Embedded Java SQL Database (http://hsqldb.org) */ HSQL, - /** The H2 Embedded Java SQL Database Engine (http://h2database.com) */ + /** The H2 Embedded Java SQL Database Engine (https://h2database.com) */ H2, - /** The Apache Derby Embedded SQL Database (http://db.apache.org/derby) */ + /** The Apache Derby Embedded SQL Database (https://db.apache.org/derby) */ DERBY } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java index 6bbe5166b95..2b0b52d2826 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java @@ -11,7 +11,7 @@ * RDBMS-specific error handling. * *

    This package and related packages are discussed in Chapter 9 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.jdbc.object; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java index 1a05b52b1b2..ae386277539 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java @@ -14,7 +14,7 @@ * * *

    This package and related packages are discussed in Chapter 9 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.jdbc; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java index 2723fc8a89b..13b8ed978dc 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/OracleLobHandler.java @@ -134,7 +134,7 @@ public class OracleLobHandler extends AbstractLobHandler { *

    A common choice is {@code SimpleNativeJdbcExtractor}, whose Connection unwrapping * (which is what OracleLobHandler needs) will work with many connection pools. * See {@code SimpleNativeJdbcExtractor} and - * + * * oracle.jdbc.OracleConnection javadoc for details. * @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor#getNativeConnectionFromStatement * @see org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor @@ -150,8 +150,8 @@ public class OracleLobHandler extends AbstractLobHandler { *

    Default is {@code true}. *

    See Also: *

    */ public void setCache(boolean cache) { @@ -168,12 +168,12 @@ public class OracleLobHandler extends AbstractLobHandler { *

    Default is {@code false}. *

    See Also: *

    */ public void setReleaseResourcesAfterRead(boolean releaseResources) { @@ -187,12 +187,12 @@ public class OracleLobHandler extends AbstractLobHandler { * DURATION_SESSION, MODE_READWRITE and MODE_READONLY constants defined there. *

    See Also: *

    * @param con the Oracle Connection, for using the exact same class loader * that the Oracle driver was loaded with diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.0.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.0.xsd index 1b1ad19b609..11ced40bd68 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.0.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.1.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.1.xsd index 9b8edee5ac6..38d6cbd64d1 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.1.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.2.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.2.xsd index a6618a59188..c170c578cf6 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.2.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-3.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.0.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.0.xsd index 7ff5db8b5ee..d87d159d7ea 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.0.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.1.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.1.xsd index 60d395843ea..24d2e0c8dbb 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.1.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.2.xsd b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.2.xsd index c5f03511f4f..b6cd0c9f53c 100644 --- a/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.2.xsd +++ b/spring-jdbc/src/main/resources/org/springframework/jdbc/config/spring-jdbc-4.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-2.5.xsd b/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-2.5.xsd index 5976262b65a..a96e33402fc 100644 --- a/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-2.5.xsd +++ b/spring-jms/src/main/resources/org/springframework/jms/config/spring-jms-2.5.xsd @@ -7,7 +7,7 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - + - + - + - + - + - + - + + * @see * STOMP Specification 1.2 DISCONNECT */ private void afterDisconnectSent(StompHeaderAccessor accessor) { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompClientSupport.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompClientSupport.java index 268f4fa262a..2c10f7aa379 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompClientSupport.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompClientSupport.java @@ -95,8 +95,8 @@ public abstract class StompClientSupport { * that default and for example set it to "0,0" if they require a * TaskScheduler to be configured first. * @param heartbeat the value for the CONNECT "heart-beat" header - * @see - * http://stomp.github.io/stomp-specification-1.2.html#Heart-beating + * @see + * https://stomp.github.io/stomp-specification-1.2.html#Heart-beating */ public void setDefaultHeartbeat(long[] heartbeat) { if (heartbeat == null || heartbeat.length != 2 || heartbeat[0] < 0 || heartbeat[1] < 0) { diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java index 6ff8778c8c4..1c2a0d7d030 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompDecoder.java @@ -245,7 +245,7 @@ public class StompDecoder { /** * See STOMP Spec 1.2: - * "Value Encoding". + * "Value Encoding". */ private String unescape(String inString) { StringBuilder sb = new StringBuilder(inString.length()); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java index e43003f03cc..efed32d501b 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompEncoder.java @@ -153,7 +153,7 @@ public class StompEncoder { /** * See STOMP Spec 1.2: - * "Value Encoding". + * "Value Encoding". */ private String escape(String inString) { StringBuilder sb = new StringBuilder(inString.length()); diff --git a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaders.java b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaders.java index 90c4bf16929..8c830fc8c47 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaders.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaders.java @@ -45,8 +45,8 @@ import org.springframework.util.StringUtils; * * @author Rossen Stoyanchev * @since 4.2 - * @see - * http://stomp.github.io/stomp-specification-1.2.html#Frames_and_Headers + * @see + * https://stomp.github.io/stomp-specification-1.2.html#Frames_and_Headers */ public class StompHeaders implements MultiValueMap, Serializable { diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessagingTemplateTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessagingTemplateTests.java index 888b8596943..d5d4ad4eaac 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessagingTemplateTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessagingTemplateTests.java @@ -74,7 +74,7 @@ public class SimpMessagingTemplateTests { @Test public void convertAndSendToUserWithEncoding() { - this.messagingTemplate.convertAndSendToUser("http://joe.openid.example.org/", "/queue/foo", "data"); + this.messagingTemplate.convertAndSendToUser("https://joe.openid.example.org/", "/queue/foo", "data"); List> messages = this.messageChannel.getMessages(); assertEquals(1, messages.size()); diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java index 4f21f074790..737d829270b 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java @@ -151,7 +151,7 @@ public class DefaultUserDestinationResolverTests { @Test public void handleMessageEncodedUserName() { - String userName = "http://joe.openid.example.org/"; + String userName = "https://joe.openid.example.org/"; TestSimpUser simpUser = new TestSimpUser(userName); simpUser.addSessions(new TestSimpSession("openid123")); diff --git a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java index 7b2fc619030..11cb546f664 100644 --- a/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java +++ b/spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/package-info.java @@ -1,6 +1,6 @@ /** * Package providing integration of - * Hibernate 4.x + * Hibernate 4.x * with Spring concepts. * *

    Contains an implementation of Spring's transaction SPI for local Hibernate transactions. diff --git a/spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/package-info.java b/spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/package-info.java index 1211ac0098f..7ed747c228a 100644 --- a/spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/package-info.java +++ b/spring-orm-hibernate5/src/main/java/org/springframework/orm/hibernate5/package-info.java @@ -1,6 +1,6 @@ /** * Package providing integration of - * Hibernate 5.x + * Hibernate 5.x * with Spring concepts. * *

    Contains an implementation of Spring's transaction SPI for local Hibernate transactions. diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java index 347980f8e0b..7f607fa36e4 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/package-info.java @@ -1,6 +1,6 @@ /** * Package providing integration of - * Hibernate 3.x + * Hibernate 3.x * with Spring concepts. * *

    Contains SessionFactory helper classes, a template plus callback diff --git a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java index 17b8b8e7c19..55a36b4b660 100644 --- a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java +++ b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java @@ -62,7 +62,7 @@ import org.springframework.util.StringUtils; * *

    When using Xerces, make sure a post 2.0.2 version is available on the classpath * to avoid a critical - * bug + * bug * that leads to StackOverflow. Maven users are likely to encounter this problem since * 2.0.2 is used by default. * diff --git a/spring-oxm/src/main/java/org/springframework/oxm/castor/package-info.java b/spring-oxm/src/main/java/org/springframework/oxm/castor/package-info.java index 3c019402923..1c59aa1ff87 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/castor/package-info.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/castor/package-info.java @@ -1,5 +1,5 @@ /** - * Package providing integration of Castor + * Package providing integration of Castor * within Spring's O/X Mapping support. */ package org.springframework.oxm.castor; diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java index 01c2329d02b..c198190dd79 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java @@ -589,7 +589,7 @@ public class Jaxb2Marshaller implements MimeMarshaller, MimeUnmarshaller, Generi supportsInternal(classArgument, false)); } else if (typeArgument instanceof GenericArrayType) { - // Only on JDK 6 - see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784 + // Only on JDK 6 - see https://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784 GenericArrayType arrayType = (GenericArrayType) typeArgument; return (Byte.TYPE == arrayType.getGenericComponentType()); } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java index 8d0d6c2457a..f007460c653 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/package-info.java @@ -1,5 +1,5 @@ /** - * Package providing integration of JAXB + * Package providing integration of JAXB * with Spring's O/X Mapping support. */ package org.springframework.oxm.jaxb; diff --git a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java index 730341079f2..1fd20186ee5 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeContainer.java @@ -24,23 +24,23 @@ import javax.activation.DataHandler; * * @author Arjen Poutsma * @since 3.0 - * @see XML-binary Optimized Packaging + * @see XML-binary Optimized Packaging */ public interface MimeContainer { /** * Indicate whether this container is a XOP package. * @return {@code true} when the constraints specified in - * Identifying XOP Documents + * Identifying XOP Documents * are met - * @see XOP Packages + * @see XOP Packages */ boolean isXopPackage(); /** * Turn this message into a XOP package. * @return {@code true} when the message actually is a XOP package - * @see XOP Packages + * @see XOP Packages */ boolean convertToXopPackage(); diff --git a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeMarshaller.java index 48569c583bb..ab730071ed0 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeMarshaller.java @@ -28,8 +28,8 @@ import org.springframework.oxm.XmlMappingException; * * @author Arjen Poutsma * @since 3.0 - * @see SOAP Message Transmission Optimization Mechanism - * @see XML-binary Optimized Packaging + * @see SOAP Message Transmission Optimization Mechanism + * @see XML-binary Optimized Packaging */ public interface MimeMarshaller extends Marshaller { diff --git a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeUnmarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeUnmarshaller.java index 331b78b2c42..96d527ac5fb 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeUnmarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/mime/MimeUnmarshaller.java @@ -28,8 +28,8 @@ import org.springframework.oxm.XmlMappingException; * * @author Arjen Poutsma * @since 3.0 - * @see SOAP Message Transmission Optimization Mechanism - * @see XML-binary Optimized Packaging + * @see SOAP Message Transmission Optimization Mechanism + * @see XML-binary Optimized Packaging */ public interface MimeUnmarshaller extends Unmarshaller { diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/package-info.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/package-info.java index e7910a93e9d..ae63d99f226 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/package-info.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/package-info.java @@ -1,5 +1,5 @@ /** - * Package providing integration of XMLBeans + * Package providing integration of XMLBeans * with Spring's O/X Mapping support. */ package org.springframework.oxm.xmlbeans; diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xstream/package-info.java b/spring-oxm/src/main/java/org/springframework/oxm/xstream/package-info.java index 5a4ab71cf5f..cbe9aca3d3a 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xstream/package-info.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xstream/package-info.java @@ -1,5 +1,5 @@ /** - * Package providing integration of XStream + * Package providing integration of XStream * with Spring's O/X Mapping support. */ package org.springframework.oxm.xstream; diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.0.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.0.xsd index c8442c5a0b4..aa9862862fb 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.0.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.0.xsd @@ -5,8 +5,8 @@ targetNamespace="http://www.springframework.org/schema/oxm" elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.1.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.1.xsd index b3807913ceb..2c9b7e02ecb 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.1.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.1.xsd @@ -5,8 +5,8 @@ targetNamespace="http://www.springframework.org/schema/oxm" elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.2.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.2.xsd index 74eaedead88..b9c3197bab2 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.2.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-3.2.xsd @@ -5,8 +5,8 @@ targetNamespace="http://www.springframework.org/schema/oxm" elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.0.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.0.xsd index 353b1b4bae2..ddf767f362d 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.0.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.0.xsd @@ -6,8 +6,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.1.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.1.xsd index 666a2850394..8f58e1d64fb 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.1.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.1.xsd @@ -6,8 +6,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.2.xsd b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.2.xsd index 8e63fdb7ae1..30ef5961f52 100644 --- a/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.2.xsd +++ b/spring-oxm/src/main/resources/org/springframework/oxm/config/spring-oxm-4.2.xsd @@ -6,8 +6,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java index 436356de2a7..225decbd045 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java @@ -79,7 +79,7 @@ public abstract class AbstractMarshallerTests { marshaller.marshal(flights, domResult); Document expected = builder.newDocument(); Element flightsElement = expected.createElementNS("http://samples.springframework.org/flight", "tns:flights"); - Attr namespace = expected.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:tns"); + Attr namespace = expected.createAttributeNS("https://www.w3.org/2000/xmlns/", "xmlns:tns"); namespace.setNodeValue("http://samples.springframework.org/flight"); flightsElement.setAttributeNode(namespace); expected.appendChild(flightsElement); @@ -103,7 +103,7 @@ public abstract class AbstractMarshallerTests { Document result = (Document) domResult.getNode(); Document expected = builder.newDocument(); Element flightsElement = expected.createElementNS("http://samples.springframework.org/flight", "tns:flights"); - Attr namespace = expected.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:tns"); + Attr namespace = expected.createAttributeNS("https://www.w3.org/2000/xmlns/", "xmlns:tns"); namespace.setNodeValue("http://samples.springframework.org/flight"); flightsElement.setAttributeNode(namespace); expected.appendChild(flightsElement); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java index 6f37fa461c3..7c8901f9f07 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/castor/CastorMarshallerTests.java @@ -82,7 +82,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests" + "" + "test8"; @@ -97,7 +97,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests" + "" + "" + "test8"; @@ -107,7 +107,7 @@ public class CastorMarshallerTests extends AbstractMarshallerTests" + "" + "test8"; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java index 7f5fd105aa9..c821ad90688 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java @@ -191,7 +191,7 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests flightTypeJAXBElement = new JAXBElement(new QName("http://springframework.org", "flight"), FlightType.class, + JAXBElement flightTypeJAXBElement = new JAXBElement(new QName("https://springframework.org", "flight"), FlightType.class, new FlightType()); assertTrue("Jaxb2Marshaller does not support JAXBElement", marshaller.supports(flightTypeJAXBElement.getClass())); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java index 513a4e24535..919d9b4504a 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2UnmarshallerTests.java @@ -91,9 +91,9 @@ public class Jaxb2UnmarshallerTests extends AbstractUnmarshallerTests")).willReturn(dataHandler); given(mimeContainer.getAttachment("696cfb9a-4d2d-402f-bb5c-59fa69e7f0b3@spring-ws.png")).willReturn(dataHandler); String content = "" + "" + - "" + + "" + "" + "" + - "" + + "" + "" + "696cfb9a-4d2d-402f-bb5c-59fa69e7f0b3@spring-ws.png" + ""; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java index 455c00637a1..974d4dcfd77 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java @@ -26,7 +26,7 @@ import javax.xml.namespace.QName; */ public class Primitives { - private static final QName NAME = new QName("http://springframework.org/oxm-test", "primitives"); + private static final QName NAME = new QName("https://springframework.org/oxm-test", "primitives"); // following methods are used to test support for primitives public JAXBElement primitiveBoolean() { diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java index 039b8e1c08e..8ce0062ec55 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java @@ -43,7 +43,7 @@ import javax.xml.namespace.QName; */ public class StandardClasses { - private static final QName NAME = new QName("http://springframework.org/oxm-test", "standard-classes"); + private static final QName NAME = new QName("https://springframework.org/oxm-test", "standard-classes"); private DatatypeFactory factory; @@ -90,7 +90,7 @@ public class StandardClasses { } public JAXBElement standardClassURI() { - return new JAXBElement(NAME, URI.class, URI.create("http://springframework.org")); + return new JAXBElement(NAME, URI.class, URI.create("https://springframework.org")); } public JAXBElement standardClassXMLGregorianCalendar() throws DatatypeConfigurationException { diff --git a/spring-oxm/src/test/resources/org/springframework/oxm/order.xsd b/spring-oxm/src/test/resources/org/springframework/oxm/order.xsd index 92eee80e41a..bf8d3718eb6 100644 --- a/spring-oxm/src/test/resources/org/springframework/oxm/order.xsd +++ b/spring-oxm/src/test/resources/org/springframework/oxm/order.xsd @@ -1,7 +1,7 @@ + targetNamespace="https://samples.springframework.org/order" + xmlns:tns="https://samples.springframework.org/order"> diff --git a/spring-test/src/main/java/org/springframework/mock/web/package-info.java b/spring-test/src/main/java/org/springframework/mock/web/package-info.java index 720f52f5afb..eb1a1f1275c 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/package-info.java +++ b/spring-test/src/main/java/org/springframework/mock/web/package-info.java @@ -5,7 +5,7 @@ *

    Useful for testing web contexts and controllers. * *

    More convenient to use than dynamic mock objects - * (EasyMock) or + * (EasyMock) or * existing Servlet API mock objects * (MockObjects). */ diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java index 526481c681f..040710fee90 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java @@ -4,7 +4,7 @@ * Useful for testing web contexts and controllers. * *

    More convenient to use than dynamic mock objects - * (EasyMock) or + * (EasyMock) or * existing Portlet API mock objects. */ package org.springframework.mock.web.portlet; diff --git a/spring-test/src/main/java/org/springframework/test/util/JsonExpectationsHelper.java b/spring-test/src/main/java/org/springframework/test/util/JsonExpectationsHelper.java index ddb5d67f8f2..081a7044aca 100644 --- a/spring-test/src/main/java/org/springframework/test/util/JsonExpectationsHelper.java +++ b/spring-test/src/main/java/org/springframework/test/util/JsonExpectationsHelper.java @@ -22,7 +22,7 @@ import org.skyscreamer.jsonassert.JSONAssert; * A helper class for assertions on JSON content. * *

    Use of this class requires the JSONassert library. + * href="https://jsonassert.skyscreamer.org/">JSONassert library. * * @author Sebastien Deleuze * @since 4.1 diff --git a/spring-test/src/main/java/org/springframework/test/util/XmlExpectationsHelper.java b/spring-test/src/main/java/org/springframework/test/util/XmlExpectationsHelper.java index 72c88addd77..793d866ddba 100644 --- a/spring-test/src/main/java/org/springframework/test/util/XmlExpectationsHelper.java +++ b/spring-test/src/main/java/org/springframework/test/util/XmlExpectationsHelper.java @@ -58,7 +58,7 @@ public class XmlExpectationsHelper { /** * Parse the content as {@link DOMSource} and apply a {@link Matcher}. - * @see xml-matchers + * @see xml-matchers */ public void assertSource(String content, Matcher matcher) throws Exception { Document document = parseXmlString(content); diff --git a/spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java b/spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java index 7c82bb78d13..e0af1f25989 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/match/ContentRequestMatchers.java @@ -168,7 +168,7 @@ public class ContentRequestMatchers { /** * Parse the request content as {@link DOMSource} and apply the given {@link Matcher}. - * @see http://code.google.com/p/xml-matchers/ + * @see https://code.google.com/p/xml-matchers/ */ public RequestMatcher source(final Matcher matcher) { return new AbstractXmlRequestMatcher() { diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcher.java b/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcher.java index 93a19fb7582..18e30a885cd 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcher.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcher.java @@ -43,7 +43,7 @@ import com.gargoylesoftware.htmlunit.WebRequest; * *

    WebRequestMatcher cdnMatcher = new HostMatcher("code.jquery.com:80");
    * - *

    The above {@code cdnMatcher} would match {@code "http://code.jquery.com/jquery.js"} + *

    The above {@code cdnMatcher} would match {@code "https://code.jquery.com/jquery.js"} * which has a default port of {@code 80} and {@code "http://code.jquery.com:80/jquery.js"}. * However, it would not match {@code "https://code.jquery.com/jquery.js"} * which has a default port of {@code 443}. diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java b/spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java index 2f0b6103102..fcf959cece3 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/request/MockHttpServletRequestBuilder.java @@ -377,7 +377,7 @@ public class MockHttpServletRequestBuilder * the requestURI. This is because most applications don't actually depend * on the name under which they're deployed. If specified here, the context * path must start with a "/" and must not end with a "/". - * @see HttpServletRequest.getContextPath() + * @see HttpServletRequest.getContextPath() */ public MockHttpServletRequestBuilder contextPath(String contextPath) { if (StringUtils.hasText(contextPath)) { @@ -399,7 +399,7 @@ public class MockHttpServletRequestBuilder * {@code "/accounts/1"} as opposed to {@code "/main/accounts/1"}. * If specified here, the servletPath must start with a "/" and must not * end with a "/". - * @see HttpServletRequest.getServletPath() + * @see HttpServletRequest.getServletPath() */ public MockHttpServletRequestBuilder servletPath(String servletPath) { if (StringUtils.hasText(servletPath)) { @@ -417,7 +417,7 @@ public class MockHttpServletRequestBuilder * requestURI and using any remaining part. If specified here, the pathInfo * must start with a "/". *

    If specified, the pathInfo will be used as is. - * @see HttpServletRequest.getServletPath() + * @see HttpServletRequest.getServletPath() */ public MockHttpServletRequestBuilder pathInfo(String pathInfo) { if (StringUtils.hasText(pathInfo)) { diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java b/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java index bd28eb47063..55c9c09bc6b 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/result/ContentResultMatchers.java @@ -200,7 +200,7 @@ public class ContentResultMatchers { /** * Parse the response content as {@link DOMSource} and apply the given * Hamcrest {@link Matcher}. - * @see xml-matchers + * @see xml-matchers */ public ResultMatcher source(final Matcher matcher) { return new ResultMatcher() { @@ -237,7 +237,7 @@ public class ContentResultMatchers { * * *

    Use of this matcher requires the JSONassert library. + * href="https://jsonassert.skyscreamer.org/">JSONassert library. * * @param jsonContent the expected JSON content * @param strict enables strict checking diff --git a/spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java b/spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java index 7fc28b0aea2..7dd67870744 100644 --- a/spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java +++ b/spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java @@ -83,7 +83,7 @@ public class MockServletContextTests { /** * Introduced to dispel claims in a thread on Stack Overflow: - * Testing Spring managed servlet + * Testing Spring managed servlet */ @Test public void getMimeTypeWithCustomConfiguredType() { diff --git a/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesTestPropertySourceTests.java b/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesTestPropertySourceTests.java index 7b8d8ea4197..ff902c6619e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesTestPropertySourceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesTestPropertySourceTests.java @@ -41,7 +41,7 @@ import static org.springframework.test.context.support.TestPropertySourceUtils.* @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @TestPropertySource(properties = { "", "foo = bar", "baz quux", "enigma: 42", "x.y.z = a=b=c", - "server.url = http://example.com", "key.value.1: key=value", "key.value.2 key=value", "key.value.3 key:value" }) + "server.url = https://example.com", "key.value.1: key=value", "key.value.2 key=value", "key.value.3 key:value" }) public class InlinedPropertiesTestPropertySourceTests { @Autowired @@ -61,7 +61,7 @@ public class InlinedPropertiesTestPropertySourceTests { // Values containing key/value delimiters (":", "=", " ") assertThat(property("x.y.z"), is("a=b=c")); - assertThat(property("server.url"), is("http://example.com")); + assertThat(property("server.url"), is("https://example.com")); assertThat(property("key.value.1"), is("key=value")); assertThat(property("key.value.2"), is("key=value")); assertThat(property("key.value.3"), is("key:value")); diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java index b2413a373c3..d91a83b4871 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java @@ -47,7 +47,7 @@ import static org.junit.Assert.*; * {@link BeforeTransaction @BeforeTransaction} and * {@link AfterTransaction @AfterTransaction} methods can fail a test in a * TestNG environment, as requested in SPR-3960. *

    *

    diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests.java index 7a341f57306..97274401f0f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingExplicitLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingExplicitLocationsInheritedTests.java index a7279025019..efd60eadbc3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingExplicitLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/BeanOverridingExplicitLocationsInheritedTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java index 8bb0eabec8e..d4eb3a0291f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java index e2540cfabb6..a282649a6f4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java index 71692c80faa..f3b75c99c96 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java index 6508935647c..2f3da5a432d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * JUnit 4 based integration test for verifying support for the * {@link ContextConfiguration#inheritLocations() inheritLocations} flag of * {@link ContextConfiguration @ContextConfiguration} indirectly proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/Spr3896SuiteTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/Spr3896SuiteTests.java index 9c59b53fa20..2e9b6e9cbb2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/Spr3896SuiteTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/Spr3896SuiteTests.java @@ -22,7 +22,7 @@ import org.junit.runners.Suite.SuiteClasses; /** * JUnit 4 based test suite for functionality proposed in SPR-3896. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java index 1385da61a2c..5c32bdfe37d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java @@ -29,7 +29,7 @@ import static org.junit.Assert.*; /** * Integration tests to verify claims made in SPR-6128. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java index 063a24c7161..0b33689dd0f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/BootstrapTestUtilsMergedConfigTests.java @@ -101,7 +101,7 @@ public class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigur /** * Introduced to investigate claims made in a discussion on - * Stack Overflow. + * Stack Overflow. */ @Test public void buildMergedConfigWithAtWebAppConfigurationWithAnnotationAndClassesOnSuperclass() { diff --git a/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java index ce647d6bbf9..753e10addbe 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/CustomizedGenericXmlContextLoaderTests.java @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * {@link AbstractGenericContextLoader} are able to customize the * newly created {@code ApplicationContext}. Specifically, this test * addresses the issues raised in SPR-4008: Supply an opportunity to customize context * before calling refresh in ContextLoaders. * diff --git a/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java b/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java index 4730d4eabbf..d36983847e4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/GenericXmlContextLoaderResourceLocationsTests.java @@ -39,7 +39,7 @@ import static org.junit.Assert.*; * {@code resource locations} by a {@link GenericXmlContextLoader} * configured via {@link ContextConfiguration @ContextConfiguration}. * Specifically, this test addresses the issues raised in SPR-3949: * ContextConfiguration annotation should accept not only classpath resources. * @@ -77,12 +77,12 @@ public class GenericXmlContextLoaderResourceLocationsTests { class ExplicitFileLocationsTestCase { } - @ContextConfiguration("http://example.com/context.xml") + @ContextConfiguration("https://example.com/context.xml") class ExplicitUrlLocationsTestCase { } @ContextConfiguration({ "context1.xml", "classpath:context2.xml", "/context3.xml", - "file:/testing/directory/context.xml", "http://example.com/context.xml" }) + "file:/testing/directory/context.xml", "https://example.com/context.xml" }) class ExplicitMixedPathTypesLocationsTestCase { } @@ -103,13 +103,13 @@ public class GenericXmlContextLoaderResourceLocationsTests { { ExplicitFileLocationsTestCase.class.getSimpleName(), new String[] { "file:/testing/directory/context.xml" } }, - { ExplicitUrlLocationsTestCase.class.getSimpleName(), new String[] { "http://example.com/context.xml" } }, + { ExplicitUrlLocationsTestCase.class.getSimpleName(), new String[] { "https://example.com/context.xml" } }, { ExplicitMixedPathTypesLocationsTestCase.class.getSimpleName(), new String[] { "classpath:/org/springframework/test/context/support/context1.xml", "classpath:context2.xml", "classpath:/context3.xml", "file:/testing/directory/context.xml", - "http://example.com/context.xml" } } + "https://example.com/context.xml" } } }); } diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java index 0af0fbc2855..66cb01be63a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java @@ -29,7 +29,7 @@ import static org.testng.Assert.*; /** *

    * TestNG based integration test to assess the claim in SPR-3880 that a "context marked dirty using * {@link DirtiesContext @DirtiesContext} in [a] TestNG based test is not * reloaded in subsequent tests". diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java index c35a40e9fc7..39c7e22b633 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java @@ -25,7 +25,7 @@ import static org.springframework.test.transaction.TransactionTestUtils.*; /** * Timed integration tests for * {@link AbstractTransactionalTestNGSpringContextTests}; used to verify claim - * raised in SPR-6124. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java index 68479f8d845..bec9e5439e6 100644 --- a/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java @@ -39,21 +39,21 @@ public class MockRestRequestMatchersTests { @Test public void requestTo() throws Exception { - this.request.setURI(new URI("http://foo.com/bar")); + this.request.setURI(new URI("http://www.foo.com/bar")); - MockRestRequestMatchers.requestTo("http://foo.com/bar").match(this.request); + MockRestRequestMatchers.requestTo("http://www.foo.com/bar").match(this.request); } @Test(expected = AssertionError.class) public void requestToNoMatch() throws Exception { - this.request.setURI(new URI("http://foo.com/bar")); + this.request.setURI(new URI("http://www.foo.com/bar")); - MockRestRequestMatchers.requestTo("http://foo.com/wrong").match(this.request); + MockRestRequestMatchers.requestTo("http://www.foo.com/wrong").match(this.request); } @Test public void requestToContains() throws Exception { - this.request.setURI(new URI("http://foo.com/bar")); + this.request.setURI(new URI("http://www.foo.com/bar")); MockRestRequestMatchers.requestTo(containsString("bar")).match(this.request); } diff --git a/spring-test/src/test/java/org/springframework/test/web/client/samples/matchers/XpathRequestMatchersIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/web/client/samples/matchers/XpathRequestMatchersIntegrationTests.java index aed503ee866..aec32742bc4 100644 --- a/spring-test/src/test/java/org/springframework/test/web/client/samples/matchers/XpathRequestMatchersIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/client/samples/matchers/XpathRequestMatchersIntegrationTests.java @@ -51,7 +51,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat public class XpathRequestMatchersIntegrationTests { private static final Map NS = - Collections.singletonMap("ns", "http://example.org/music/people"); + Collections.singletonMap("ns", "https://example.org/music/people"); private MockRestServiceServer mockServer; @@ -192,7 +192,7 @@ public class XpathRequestMatchersIntegrationTests { @SuppressWarnings("unused") - @XmlRootElement(name="people", namespace="http://example.org/music/people") + @XmlRootElement(name="people", namespace="https://example.org/music/people") @XmlAccessorType(XmlAccessType.FIELD) private static class PeopleWrapper { diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java index 6e8673c84b7..4a134d71417 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java @@ -138,7 +138,7 @@ public class DelegatingWebConnectionTests { webClient.setWebConnection(webConnection); - Page page = webClient.getPage("http://code.jquery.com/jquery-1.11.0.min.js"); + Page page = webClient.getPage("https://code.jquery.com/jquery-1.11.0.min.js"); assertThat(page.getWebResponse().getStatusCode(), equalTo(200)); assertThat(page.getWebResponse().getContentAsString(), not(isEmptyString())); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java index ecf4f245918..1e5c5edd722 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HostRequestMatcherTests.java @@ -31,14 +31,14 @@ public class HostRequestMatcherTests extends AbstractWebRequestMatcherTests { public void localhost() throws Exception { WebRequestMatcher matcher = new HostRequestMatcher("localhost"); assertMatches(matcher, "http://localhost/jquery-1.11.0.min.js"); - assertDoesNotMatch(matcher, "http://example.com/jquery-1.11.0.min.js"); + assertDoesNotMatch(matcher, "https://example.com/jquery-1.11.0.min.js"); } @Test public void multipleHosts() throws Exception { WebRequestMatcher matcher = new HostRequestMatcher("localhost", "example.com"); assertMatches(matcher, "http://localhost/jquery-1.11.0.min.js"); - assertMatches(matcher, "http://example.com/jquery-1.11.0.min.js"); + assertMatches(matcher, "https://example.com/jquery-1.11.0.min.js"); } @Test diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HtmlUnitRequestBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HtmlUnitRequestBuilderTests.java index 21152474763..2b1e812ee8e 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HtmlUnitRequestBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/HtmlUnitRequestBuilderTests.java @@ -155,7 +155,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestContextPathUsesNoFirstSegmentWithDefault() throws MalformedURLException { - webRequest.setUrl(new URL("http://example.com/")); + webRequest.setUrl(new URL("https://example.com/")); String contextPath = requestBuilder.buildRequest(servletContext).getContextPath(); assertThat(contextPath, equalTo("")); @@ -400,7 +400,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapFromSingleQueryParam() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name=value")); + webRequest.setUrl(new URL("https://example.com/example/?name=value")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -410,7 +410,7 @@ public class HtmlUnitRequestBuilderTests { @Test // SPR-14177 public void buildRequestParameterMapDecodesParameterName() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?row%5B0%5D=value")); + webRequest.setUrl(new URL("https://example.com/example/?row%5B0%5D=value")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -420,7 +420,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapDecodesParameterValue() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name=row%5B0%5D")); + webRequest.setUrl(new URL("https://example.com/example/?name=row%5B0%5D")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -430,7 +430,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapFromSingleQueryParamWithoutValueAndWithoutEqualsSign() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name")); + webRequest.setUrl(new URL("https://example.com/example/?name")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -440,7 +440,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapFromSingleQueryParamWithoutValueButWithEqualsSign() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name=")); + webRequest.setUrl(new URL("https://example.com/example/?name=")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -450,7 +450,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapFromSingleQueryParamWithValueSetToEncodedSpace() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name=%20")); + webRequest.setUrl(new URL("https://example.com/example/?name=%20")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -460,7 +460,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestParameterMapFromMultipleQueryParams() throws Exception { - webRequest.setUrl(new URL("http://example.com/example/?name=value¶m2=value+2")); + webRequest.setUrl(new URL("https://example.com/example/?name=value¶m2=value+2")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -478,7 +478,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestPathInfoNull() throws Exception { - webRequest.setUrl(new URL("http://example.com/example")); + webRequest.setUrl(new URL("https://example.com/example")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -487,7 +487,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestAndAntPathRequestMatcher() throws Exception { - webRequest.setUrl(new URL("http://example.com/app/login/authenticate")); + webRequest.setUrl(new URL("https://example.com/app/login/authenticate")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -506,7 +506,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestQueryWithSingleQueryParam() throws Exception { String expectedQuery = "param=value"; - webRequest.setUrl(new URL("http://example.com/example?" + expectedQuery)); + webRequest.setUrl(new URL("https://example.com/example?" + expectedQuery)); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -516,7 +516,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestQueryWithSingleQueryParamWithoutValueAndWithoutEqualsSign() throws Exception { String expectedQuery = "param"; - webRequest.setUrl(new URL("http://example.com/example?" + expectedQuery)); + webRequest.setUrl(new URL("https://example.com/example?" + expectedQuery)); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -526,7 +526,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestQueryWithSingleQueryParamWithoutValueButWithEqualsSign() throws Exception { String expectedQuery = "param="; - webRequest.setUrl(new URL("http://example.com/example?" + expectedQuery)); + webRequest.setUrl(new URL("https://example.com/example?" + expectedQuery)); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -536,7 +536,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestQueryWithSingleQueryParamWithValueSetToEncodedSpace() throws Exception { String expectedQuery = "param=%20"; - webRequest.setUrl(new URL("http://example.com/example?" + expectedQuery)); + webRequest.setUrl(new URL("https://example.com/example?" + expectedQuery)); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -546,7 +546,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestQueryWithMultipleQueryParams() throws Exception { String expectedQuery = "param1=value1¶m2=value2"; - webRequest.setUrl(new URL("http://example.com/example?" + expectedQuery)); + webRequest.setUrl(new URL("https://example.com/example?" + expectedQuery)); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -587,7 +587,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestRemotePort8080() throws Exception { - webRequest.setUrl(new URL("http://example.com:8080/")); + webRequest.setUrl(new URL("https://example.com:8080/")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -596,7 +596,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestRemotePort80WithDefault() throws Exception { - webRequest.setUrl(new URL("http://example.com/")); + webRequest.setUrl(new URL("https://example.com/")); MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext); @@ -628,7 +628,7 @@ public class HtmlUnitRequestBuilderTests { @Test public void buildRequestUrl() { String uri = requestBuilder.buildRequest(servletContext).getRequestURL().toString(); - assertThat(uri, equalTo("http://example.com/test/this/here")); + assertThat(uri, equalTo("https://example.com/test/this/here")); } @Test diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcConnectionBuilderSupportTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcConnectionBuilderSupportTests.java index fc245628a12..fcae7df148b 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcConnectionBuilderSupportTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcConnectionBuilderSupportTests.java @@ -91,13 +91,13 @@ public class MockMvcConnectionBuilderSupportTests { .createConnection(delegateConnection); assertMvcProcessed("http://localhost/"); - assertDelegateProcessed("http://example.com/"); + assertDelegateProcessed("https://example.com/"); } @Test public void mockMvc() throws Exception { assertMvcProcessed("http://localhost/"); - assertDelegateProcessed("http://example.com/"); + assertDelegateProcessed("https://example.com/"); } @Test @@ -107,7 +107,7 @@ public class MockMvcConnectionBuilderSupportTests { .createConnection(delegateConnection); assertMvcProcessed("http://localhost/"); - assertMvcProcessed("http://example.com/"); + assertMvcProcessed("https://example.com/"); assertDelegateProcessed("http://other.com/"); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java index 690bd3cde4e..a218983c138 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java @@ -85,7 +85,7 @@ public class MockMvcWebClientBuilderTests { this.webClient = MockMvcWebClientBuilder.mockMvcSetup(this.mockMvc).build(); assertMvcProcessed("http://localhost/test"); - Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("http://example.com/")); + Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("https://example.com/")); } @Test @@ -94,7 +94,7 @@ public class MockMvcWebClientBuilderTests { this.webClient = MockMvcWebClientBuilder.mockMvcSetup(this.mockMvc).withDelegate(otherClient).build(); assertMvcProcessed("http://localhost/test"); - Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("http://example.com/")); + Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("https://example.com/")); } private void assertMvcProcessed(String url) throws Exception { diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/UrlRegexRequestMatcherTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/UrlRegexRequestMatcherTests.java index 1ee3e95dab7..e08e27d75ad 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/UrlRegexRequestMatcherTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/UrlRegexRequestMatcherTests.java @@ -30,7 +30,7 @@ public class UrlRegexRequestMatcherTests extends AbstractWebRequestMatcherTests @Test public void verifyExampleInClassLevelJavadoc() throws Exception { WebRequestMatcher cdnMatcher = new UrlRegexRequestMatcher(".*?//code.jquery.com/.*"); - assertMatches(cdnMatcher, "http://code.jquery.com/jquery-1.11.0.min.js"); + assertMatches(cdnMatcher, "https://code.jquery.com/jquery-1.11.0.min.js"); assertDoesNotMatch(cdnMatcher, "http://localhost/jquery-1.11.0.min.js"); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java index 94a1d373ff3..992ed727799 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java @@ -85,7 +85,7 @@ public class MockMvcHtmlUnitDriverBuilderTests { this.driver = MockMvcHtmlUnitDriverBuilder.mockMvcSetup(this.mockMvc).withDelegate(otherDriver).build(); assertMvcProcessed("http://localhost/test"); - Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("http://example.com/")); + Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("https://example.com/")); } @Test @@ -93,7 +93,7 @@ public class MockMvcHtmlUnitDriverBuilderTests { this.driver = MockMvcHtmlUnitDriverBuilder.mockMvcSetup(this.mockMvc).build(); assertMvcProcessed("http://localhost/test"); - Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("http://example.com/")); + Assume.group(TestGroup.PERFORMANCE, () -> assertDelegateProcessed("https://example.com/")); } @Test diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/FlashAttributeAssertionTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/FlashAttributeAssertionTests.java index e2684e41097..f533d18d92b 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/FlashAttributeAssertionTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/FlashAttributeAssertionTests.java @@ -61,10 +61,10 @@ public class FlashAttributeAssertionTests { this.mockMvc.perform(post("/persons")) .andExpect(flash().attribute("one", "1")) .andExpect(flash().attribute("two", 2.222)) - .andExpect(flash().attribute("three", new URL("http://example.com"))) + .andExpect(flash().attribute("three", new URL("https://example.com"))) .andExpect(flash().attribute("one", equalTo("1"))) // Hamcrest... .andExpect(flash().attribute("two", equalTo(2.222))) - .andExpect(flash().attribute("three", equalTo(new URL("http://example.com")))); + .andExpect(flash().attribute("three", equalTo(new URL("https://example.com")))); } @Test @@ -83,7 +83,7 @@ public class FlashAttributeAssertionTests { public String save(RedirectAttributes redirectAttrs) throws Exception { redirectAttrs.addFlashAttribute("one", "1"); redirectAttrs.addFlashAttribute("two", 2.222); - redirectAttrs.addFlashAttribute("three", new URL("http://example.com")); + redirectAttrs.addFlashAttribute("three", new URL("https://example.com")); return "redirect:/person/1"; } } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/XpathAssertionTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/XpathAssertionTests.java index 404983de553..6dd0ff66665 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/XpathAssertionTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/samples/standalone/resultmatchers/XpathAssertionTests.java @@ -53,7 +53,7 @@ import static org.springframework.web.bind.annotation.RequestMethod.*; public class XpathAssertionTests { private static final Map musicNamespace = - Collections.singletonMap("ns", "http://example.org/music/people"); + Collections.singletonMap("ns", "https://example.org/music/people"); private MockMvc mockMvc; @@ -160,7 +160,7 @@ public class XpathAssertionTests { .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_ATOM_XML)) .andExpect(xpath("//feed/title").string("Test Feed")) - .andExpect(xpath("//feed/icon").string("http://www.example.com/favicon.ico")); + .andExpect(xpath("//feed/icon").string("https://www.example.com/favicon.ico")); } @@ -185,7 +185,7 @@ public class XpathAssertionTests { } @SuppressWarnings("unused") - @XmlRootElement(name="people", namespace="http://example.org/music/people") + @XmlRootElement(name="people", namespace="https://example.org/music/people") @XmlAccessorType(XmlAccessType.FIELD) private static class PeopleWrapper { @@ -224,7 +224,7 @@ public class XpathAssertionTests { return "\r\n" + "\r\n" + " Test Feed\r\n" - + " http://www.example.com/favicon.ico\r\n" + + " https://www.example.com/favicon.ico\r\n" + "\r\n\r\n"; } } diff --git a/spring-test/src/test/resources/META-INF/web-resources/WEB-INF/layouts/standardLayout.jsp b/spring-test/src/test/resources/META-INF/web-resources/WEB-INF/layouts/standardLayout.jsp index dc3f6216ae0..51499dabc98 100644 --- a/spring-test/src/test/resources/META-INF/web-resources/WEB-INF/layouts/standardLayout.jsp +++ b/spring-test/src/test/resources/META-INF/web-resources/WEB-INF/layouts/standardLayout.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> - + diff --git a/spring-test/src/test/webapp/WEB-INF/layouts/main.jsp b/spring-test/src/test/webapp/WEB-INF/layouts/main.jsp index 408d8fc932a..a3f3f6584ae 100644 --- a/spring-test/src/test/webapp/WEB-INF/layouts/main.jsp +++ b/spring-test/src/test/webapp/WEB-INF/layouts/main.jsp @@ -1,6 +1,6 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> - + diff --git a/spring-tx/src/main/java/org/springframework/dao/DataAccessException.java b/spring-tx/src/main/java/org/springframework/dao/DataAccessException.java index f0aa02bd438..93d3eec5385 100644 --- a/spring-tx/src/main/java/org/springframework/dao/DataAccessException.java +++ b/spring-tx/src/main/java/org/springframework/dao/DataAccessException.java @@ -20,7 +20,7 @@ import org.springframework.core.NestedRuntimeException; /** * Root of the hierarchy of data access exceptions discussed in - * Expert One-On-One J2EE Design and Development. + * Expert One-On-One J2EE Design and Development. * Please see Chapter 9 of this book for detailed discussion of the * motivation for this package. * diff --git a/spring-tx/src/main/java/org/springframework/dao/package-info.java b/spring-tx/src/main/java/org/springframework/dao/package-info.java index 4e9a18651ed..89febbf04bd 100644 --- a/spring-tx/src/main/java/org/springframework/dao/package-info.java +++ b/spring-tx/src/main/java/org/springframework/dao/package-info.java @@ -10,7 +10,7 @@ * leave them uncaught and treat all data access exceptions as fatal. * *

    The classes in this package are discussed in Chapter 9 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.dao; diff --git a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java index a0cbae1a803..ea54eb0c8ce 100644 --- a/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java +++ b/spring-tx/src/main/java/org/springframework/jca/context/SpringContextResourceAdapter.java @@ -70,7 +70,7 @@ import org.springframework.util.StringUtils; * <?xml version="1.0" encoding="UTF-8"?> * <connector xmlns="http://java.sun.com/xml/ns/j2ee" * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - * xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" + * xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee https://java.sun.com/xml/ns/j2ee/connector_1_5.xsd" * version="1.5"> * <vendor-name>Spring Framework</vendor-name> * <eis-type>Spring Connector</eis-type> diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java index 5708c2c619e..558d1c498c7 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionProxyFactoryBean.java @@ -39,7 +39,7 @@ import org.springframework.transaction.PlatformTransactionManager; * target object with a transactional proxy, proxying all the interfaces that the target * implements. However, in Spring versions 2.0 and beyond, the functionality provided here * is superseded by the more convenient {@code tx:} XML namespace. See the declarative transaction management section of the + * href="https://bit.ly/qUwvwz">declarative transaction management section of the * Spring reference documentation to understand the modern options for managing * transactions in Spring applications. For these reasons, users should favor of * the {@code tx:} XML namespace as well as diff --git a/spring-tx/src/main/resources/org/springframework/transaction/config/spring-tx-2.0.xsd b/spring-tx/src/main/resources/org/springframework/transaction/config/spring-tx-2.0.xsd index 2d3837e7961..ad6e3ce4a07 100644 --- a/spring-tx/src/main/resources/org/springframework/transaction/config/spring-tx-2.0.xsd +++ b/spring-tx/src/main/resources/org/springframework/transaction/config/spring-tx-2.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + this forum post. + * See this forum post. */ @Test public void testConflictingRulesToDetermineExactContract() { diff --git a/spring-web/src/main/java/org/springframework/http/HttpEntity.java b/spring-web/src/main/java/org/springframework/http/HttpEntity.java index b5edb26901c..789a9742e3b 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpEntity.java +++ b/spring-web/src/main/java/org/springframework/http/HttpEntity.java @@ -28,11 +28,11 @@ import org.springframework.util.ObjectUtils; * HttpHeaders headers = new HttpHeaders(); * headers.setContentType(MediaType.TEXT_PLAIN); * HttpEntity<String> entity = new HttpEntity<String>(helloWorld, headers); - * URI location = template.postForLocation("http://example.com", entity); + * URI location = template.postForLocation("https://example.com", entity); *

    * or *
    - * HttpEntity<String> entity = template.getForEntity("http://example.com", String.class);
    + * HttpEntity<String> entity = template.getForEntity("https://example.com", String.class);
      * String body = entity.getBody();
      * MediaType contentType = entity.getHeaders().getContentType();
      * 
    diff --git a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java index c91ad8a515f..2f93372a856 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpHeaders.java +++ b/spring-web/src/main/java/org/springframework/http/HttpHeaders.java @@ -63,302 +63,302 @@ public class HttpHeaders implements MultiValueMap, Serializable /** * The HTTP {@code Accept} header field name. - * @see Section 5.3.2 of RFC 7231 + * @see Section 5.3.2 of RFC 7231 */ public static final String ACCEPT = "Accept"; /** * The HTTP {@code Accept-Charset} header field name. - * @see Section 5.3.3 of RFC 7231 + * @see Section 5.3.3 of RFC 7231 */ public static final String ACCEPT_CHARSET = "Accept-Charset"; /** * The HTTP {@code Accept-Encoding} header field name. - * @see Section 5.3.4 of RFC 7231 + * @see Section 5.3.4 of RFC 7231 */ public static final String ACCEPT_ENCODING = "Accept-Encoding"; /** * The HTTP {@code Accept-Language} header field name. - * @see Section 5.3.5 of RFC 7231 + * @see Section 5.3.5 of RFC 7231 */ public static final String ACCEPT_LANGUAGE = "Accept-Language"; /** * The HTTP {@code Accept-Ranges} header field name. - * @see Section 5.3.5 of RFC 7233 + * @see Section 5.3.5 of RFC 7233 */ public static final String ACCEPT_RANGES = "Accept-Ranges"; /** * The CORS {@code Access-Control-Allow-Credentials} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials"; /** * The CORS {@code Access-Control-Allow-Headers} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers"; /** * The CORS {@code Access-Control-Allow-Methods} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods"; /** * The CORS {@code Access-Control-Allow-Origin} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin"; /** * The CORS {@code Access-Control-Expose-Headers} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers"; /** * The CORS {@code Access-Control-Max-Age} response header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age"; /** * The CORS {@code Access-Control-Request-Headers} request header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers"; /** * The CORS {@code Access-Control-Request-Method} request header field name. - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method"; /** * The HTTP {@code Age} header field name. - * @see Section 5.1 of RFC 7234 + * @see Section 5.1 of RFC 7234 */ public static final String AGE = "Age"; /** * The HTTP {@code Allow} header field name. - * @see Section 7.4.1 of RFC 7231 + * @see Section 7.4.1 of RFC 7231 */ public static final String ALLOW = "Allow"; /** * The HTTP {@code Authorization} header field name. - * @see Section 4.2 of RFC 7235 + * @see Section 4.2 of RFC 7235 */ public static final String AUTHORIZATION = "Authorization"; /** * The HTTP {@code Cache-Control} header field name. - * @see Section 5.2 of RFC 7234 + * @see Section 5.2 of RFC 7234 */ public static final String CACHE_CONTROL = "Cache-Control"; /** * The HTTP {@code Connection} header field name. - * @see Section 6.1 of RFC 7230 + * @see Section 6.1 of RFC 7230 */ public static final String CONNECTION = "Connection"; /** * The HTTP {@code Content-Encoding} header field name. - * @see Section 3.1.2.2 of RFC 7231 + * @see Section 3.1.2.2 of RFC 7231 */ public static final String CONTENT_ENCODING = "Content-Encoding"; /** * The HTTP {@code Content-Disposition} header field name - * @see RFC 6266 + * @see RFC 6266 */ public static final String CONTENT_DISPOSITION = "Content-Disposition"; /** * The HTTP {@code Content-Language} header field name. - * @see Section 3.1.3.2 of RFC 7231 + * @see Section 3.1.3.2 of RFC 7231 */ public static final String CONTENT_LANGUAGE = "Content-Language"; /** * The HTTP {@code Content-Length} header field name. - * @see Section 3.3.2 of RFC 7230 + * @see Section 3.3.2 of RFC 7230 */ public static final String CONTENT_LENGTH = "Content-Length"; /** * The HTTP {@code Content-Location} header field name. - * @see Section 3.1.4.2 of RFC 7231 + * @see Section 3.1.4.2 of RFC 7231 */ public static final String CONTENT_LOCATION = "Content-Location"; /** * The HTTP {@code Content-Range} header field name. - * @see Section 4.2 of RFC 7233 + * @see Section 4.2 of RFC 7233 */ public static final String CONTENT_RANGE = "Content-Range"; /** * The HTTP {@code Content-Type} header field name. - * @see Section 3.1.1.5 of RFC 7231 + * @see Section 3.1.1.5 of RFC 7231 */ public static final String CONTENT_TYPE = "Content-Type"; /** * The HTTP {@code Cookie} header field name. - * @see Section 4.3.4 of RFC 2109 + * @see Section 4.3.4 of RFC 2109 */ public static final String COOKIE = "Cookie"; /** * The HTTP {@code Date} header field name. - * @see Section 7.1.1.2 of RFC 7231 + * @see Section 7.1.1.2 of RFC 7231 */ public static final String DATE = "Date"; /** * The HTTP {@code ETag} header field name. - * @see Section 2.3 of RFC 7232 + * @see Section 2.3 of RFC 7232 */ public static final String ETAG = "ETag"; /** * The HTTP {@code Expect} header field name. - * @see Section 5.1.1 of RFC 7231 + * @see Section 5.1.1 of RFC 7231 */ public static final String EXPECT = "Expect"; /** * The HTTP {@code Expires} header field name. - * @see Section 5.3 of RFC 7234 + * @see Section 5.3 of RFC 7234 */ public static final String EXPIRES = "Expires"; /** * The HTTP {@code From} header field name. - * @see Section 5.5.1 of RFC 7231 + * @see Section 5.5.1 of RFC 7231 */ public static final String FROM = "From"; /** * The HTTP {@code Host} header field name. - * @see Section 5.4 of RFC 7230 + * @see Section 5.4 of RFC 7230 */ public static final String HOST = "Host"; /** * The HTTP {@code If-Match} header field name. - * @see Section 3.1 of RFC 7232 + * @see Section 3.1 of RFC 7232 */ public static final String IF_MATCH = "If-Match"; /** * The HTTP {@code If-Modified-Since} header field name. - * @see Section 3.3 of RFC 7232 + * @see Section 3.3 of RFC 7232 */ public static final String IF_MODIFIED_SINCE = "If-Modified-Since"; /** * The HTTP {@code If-None-Match} header field name. - * @see Section 3.2 of RFC 7232 + * @see Section 3.2 of RFC 7232 */ public static final String IF_NONE_MATCH = "If-None-Match"; /** * The HTTP {@code If-Range} header field name. - * @see Section 3.2 of RFC 7233 + * @see Section 3.2 of RFC 7233 */ public static final String IF_RANGE = "If-Range"; /** * The HTTP {@code If-Unmodified-Since} header field name. - * @see Section 3.4 of RFC 7232 + * @see Section 3.4 of RFC 7232 */ public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since"; /** * The HTTP {@code Last-Modified} header field name. - * @see Section 2.2 of RFC 7232 + * @see Section 2.2 of RFC 7232 */ public static final String LAST_MODIFIED = "Last-Modified"; /** * The HTTP {@code Link} header field name. - * @see RFC 5988 + * @see RFC 5988 */ public static final String LINK = "Link"; /** * The HTTP {@code Location} header field name. - * @see Section 7.1.2 of RFC 7231 + * @see Section 7.1.2 of RFC 7231 */ public static final String LOCATION = "Location"; /** * The HTTP {@code Max-Forwards} header field name. - * @see Section 5.1.2 of RFC 7231 + * @see Section 5.1.2 of RFC 7231 */ public static final String MAX_FORWARDS = "Max-Forwards"; /** * The HTTP {@code Origin} header field name. - * @see RFC 6454 + * @see RFC 6454 */ public static final String ORIGIN = "Origin"; /** * The HTTP {@code Pragma} header field name. - * @see Section 5.4 of RFC 7234 + * @see Section 5.4 of RFC 7234 */ public static final String PRAGMA = "Pragma"; /** * The HTTP {@code Proxy-Authenticate} header field name. - * @see Section 4.3 of RFC 7235 + * @see Section 4.3 of RFC 7235 */ public static final String PROXY_AUTHENTICATE = "Proxy-Authenticate"; /** * The HTTP {@code Proxy-Authorization} header field name. - * @see Section 4.4 of RFC 7235 + * @see Section 4.4 of RFC 7235 */ public static final String PROXY_AUTHORIZATION = "Proxy-Authorization"; /** * The HTTP {@code Range} header field name. - * @see Section 3.1 of RFC 7233 + * @see Section 3.1 of RFC 7233 */ public static final String RANGE = "Range"; /** * The HTTP {@code Referer} header field name. - * @see Section 5.5.2 of RFC 7231 + * @see Section 5.5.2 of RFC 7231 */ public static final String REFERER = "Referer"; /** * The HTTP {@code Retry-After} header field name. - * @see Section 7.1.3 of RFC 7231 + * @see Section 7.1.3 of RFC 7231 */ public static final String RETRY_AFTER = "Retry-After"; /** * The HTTP {@code Server} header field name. - * @see Section 7.4.2 of RFC 7231 + * @see Section 7.4.2 of RFC 7231 */ public static final String SERVER = "Server"; /** * The HTTP {@code Set-Cookie} header field name. - * @see Section 4.2.2 of RFC 2109 + * @see Section 4.2.2 of RFC 2109 */ public static final String SET_COOKIE = "Set-Cookie"; /** * The HTTP {@code Set-Cookie2} header field name. - * @see RFC 2965 + * @see RFC 2965 */ public static final String SET_COOKIE2 = "Set-Cookie2"; /** * The HTTP {@code TE} header field name. - * @see Section 4.3 of RFC 7230 + * @see Section 4.3 of RFC 7230 */ public static final String TE = "TE"; /** * The HTTP {@code Trailer} header field name. - * @see Section 4.4 of RFC 7230 + * @see Section 4.4 of RFC 7230 */ public static final String TRAILER = "Trailer"; /** * The HTTP {@code Transfer-Encoding} header field name. - * @see Section 3.3.1 of RFC 7230 + * @see Section 3.3.1 of RFC 7230 */ public static final String TRANSFER_ENCODING = "Transfer-Encoding"; /** * The HTTP {@code Upgrade} header field name. - * @see Section 6.7 of RFC 7230 + * @see Section 6.7 of RFC 7230 */ public static final String UPGRADE = "Upgrade"; /** * The HTTP {@code User-Agent} header field name. - * @see Section 5.5.3 of RFC 7231 + * @see Section 5.5.3 of RFC 7231 */ public static final String USER_AGENT = "User-Agent"; /** * The HTTP {@code Vary} header field name. - * @see Section 7.1.4 of RFC 7231 + * @see Section 7.1.4 of RFC 7231 */ public static final String VARY = "Vary"; /** * The HTTP {@code Via} header field name. - * @see Section 5.7.1 of RFC 7230 + * @see Section 5.7.1 of RFC 7230 */ public static final String VIA = "Via"; /** * The HTTP {@code Warning} header field name. - * @see Section 5.5 of RFC 7234 + * @see Section 5.5 of RFC 7234 */ public static final String WARNING = "Warning"; /** * The HTTP {@code WWW-Authenticate} header field name. - * @see Section 4.1 of RFC 7235 + * @see Section 4.1 of RFC 7235 */ public static final String WWW_AUTHENTICATE = "WWW-Authenticate"; diff --git a/spring-web/src/main/java/org/springframework/http/HttpRange.java b/spring-web/src/main/java/org/springframework/http/HttpRange.java index f9bcb61fdc3..56c1fc2cda7 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpRange.java +++ b/spring-web/src/main/java/org/springframework/http/HttpRange.java @@ -32,7 +32,7 @@ import org.springframework.util.StringUtils; * @author Arjen Poutsma * @author Juergen Hoeller * @since 4.2 - * @see HTTP/1.1: Range Requests + * @see HTTP/1.1: Range Requests * @see HttpHeaders#setRange(List) * @see HttpHeaders#getRange() */ @@ -60,7 +60,7 @@ public abstract class HttpRange { * Create an {@code HttpRange} from the given position to the end. * @param firstBytePos the first byte position * @return a byte range that ranges from {@code firstPos} till the end - * @see Byte Ranges + * @see Byte Ranges */ public static HttpRange createByteRange(long firstBytePos) { return new ByteRange(firstBytePos, null); @@ -71,7 +71,7 @@ public abstract class HttpRange { * @param firstBytePos the first byte position * @param lastBytePos the last byte position * @return a byte range that ranges from {@code firstPos} till {@code lastPos} - * @see Byte Ranges + * @see Byte Ranges */ public static HttpRange createByteRange(long firstBytePos, long lastBytePos) { return new ByteRange(firstBytePos, lastBytePos); @@ -81,7 +81,7 @@ public abstract class HttpRange { * Create an {@code HttpRange} that ranges over the last given number of bytes. * @param suffixLength the number of bytes for the range * @return a byte range that ranges over the last {@code suffixLength} number of bytes - * @see Byte Ranges + * @see Byte Ranges */ public static HttpRange createSuffixRange(long suffixLength) { return new SuffixByteRange(suffixLength); @@ -155,7 +155,7 @@ public abstract class HttpRange { /** * Represents an HTTP/1.1 byte range, with a first and optional last position. - * @see Byte Ranges + * @see Byte Ranges * @see HttpRange#createByteRange(long) * @see HttpRange#createByteRange(long, long) */ @@ -230,7 +230,7 @@ public abstract class HttpRange { /** * Represents an HTTP/1.1 suffix byte range, with a number of suffix bytes. - * @see Byte Ranges + * @see Byte Ranges * @see HttpRange#createSuffixRange(long) */ private static class SuffixByteRange extends HttpRange { diff --git a/spring-web/src/main/java/org/springframework/http/HttpStatus.java b/spring-web/src/main/java/org/springframework/http/HttpStatus.java index 5d47bcdaabf..af71cafdd17 100644 --- a/spring-web/src/main/java/org/springframework/http/HttpStatus.java +++ b/spring-web/src/main/java/org/springframework/http/HttpStatus.java @@ -25,8 +25,8 @@ package org.springframework.http; * @author Sebastien Deleuze * @since 3.0 * @see HttpStatus.Series - * @see HTTP Status Code Registry - * @see List of HTTP status codes - Wikipedia + * @see HTTP Status Code Registry + * @see List of HTTP status codes - Wikipedia */ public enum HttpStatus { @@ -34,22 +34,22 @@ public enum HttpStatus { /** * {@code 100 Continue}. - * @see HTTP/1.1: Semantics and Content, section 6.2.1 + * @see HTTP/1.1: Semantics and Content, section 6.2.1 */ CONTINUE(100, "Continue"), /** * {@code 101 Switching Protocols}. - * @see HTTP/1.1: Semantics and Content, section 6.2.2 + * @see HTTP/1.1: Semantics and Content, section 6.2.2 */ SWITCHING_PROTOCOLS(101, "Switching Protocols"), /** * {@code 102 Processing}. - * @see WebDAV + * @see WebDAV */ PROCESSING(102, "Processing"), /** * {@code 103 Checkpoint}. - * @see A proposal for supporting + * @see A proposal for supporting * resumable POST/PUT HTTP requests in HTTP/1.0 */ CHECKPOINT(103, "Checkpoint"), @@ -58,52 +58,52 @@ public enum HttpStatus { /** * {@code 200 OK}. - * @see HTTP/1.1: Semantics and Content, section 6.3.1 + * @see HTTP/1.1: Semantics and Content, section 6.3.1 */ OK(200, "OK"), /** * {@code 201 Created}. - * @see HTTP/1.1: Semantics and Content, section 6.3.2 + * @see HTTP/1.1: Semantics and Content, section 6.3.2 */ CREATED(201, "Created"), /** * {@code 202 Accepted}. - * @see HTTP/1.1: Semantics and Content, section 6.3.3 + * @see HTTP/1.1: Semantics and Content, section 6.3.3 */ ACCEPTED(202, "Accepted"), /** * {@code 203 Non-Authoritative Information}. - * @see HTTP/1.1: Semantics and Content, section 6.3.4 + * @see HTTP/1.1: Semantics and Content, section 6.3.4 */ NON_AUTHORITATIVE_INFORMATION(203, "Non-Authoritative Information"), /** * {@code 204 No Content}. - * @see HTTP/1.1: Semantics and Content, section 6.3.5 + * @see HTTP/1.1: Semantics and Content, section 6.3.5 */ NO_CONTENT(204, "No Content"), /** * {@code 205 Reset Content}. - * @see HTTP/1.1: Semantics and Content, section 6.3.6 + * @see HTTP/1.1: Semantics and Content, section 6.3.6 */ RESET_CONTENT(205, "Reset Content"), /** * {@code 206 Partial Content}. - * @see HTTP/1.1: Range Requests, section 4.1 + * @see HTTP/1.1: Range Requests, section 4.1 */ PARTIAL_CONTENT(206, "Partial Content"), /** * {@code 207 Multi-Status}. - * @see WebDAV + * @see WebDAV */ MULTI_STATUS(207, "Multi-Status"), /** * {@code 208 Already Reported}. - * @see WebDAV Binding Extensions + * @see WebDAV Binding Extensions */ ALREADY_REPORTED(208, "Already Reported"), /** * {@code 226 IM Used}. - * @see Delta encoding in HTTP + * @see Delta encoding in HTTP */ IM_USED(226, "IM Used"), @@ -111,51 +111,51 @@ public enum HttpStatus { /** * {@code 300 Multiple Choices}. - * @see HTTP/1.1: Semantics and Content, section 6.4.1 + * @see HTTP/1.1: Semantics and Content, section 6.4.1 */ MULTIPLE_CHOICES(300, "Multiple Choices"), /** * {@code 301 Moved Permanently}. - * @see HTTP/1.1: Semantics and Content, section 6.4.2 + * @see HTTP/1.1: Semantics and Content, section 6.4.2 */ MOVED_PERMANENTLY(301, "Moved Permanently"), /** * {@code 302 Found}. - * @see HTTP/1.1: Semantics and Content, section 6.4.3 + * @see HTTP/1.1: Semantics and Content, section 6.4.3 */ FOUND(302, "Found"), /** * {@code 302 Moved Temporarily}. - * @see HTTP/1.0, section 9.3 + * @see HTTP/1.0, section 9.3 * @deprecated In favor of {@link #FOUND} which will be returned from {@code HttpStatus.valueOf(302)} */ @Deprecated MOVED_TEMPORARILY(302, "Moved Temporarily"), /** * {@code 303 See Other}. - * @see HTTP/1.1: Semantics and Content, section 6.4.4 + * @see HTTP/1.1: Semantics and Content, section 6.4.4 */ SEE_OTHER(303, "See Other"), /** * {@code 304 Not Modified}. - * @see HTTP/1.1: Conditional Requests, section 4.1 + * @see HTTP/1.1: Conditional Requests, section 4.1 */ NOT_MODIFIED(304, "Not Modified"), /** * {@code 305 Use Proxy}. - * @see HTTP/1.1: Semantics and Content, section 6.4.5 + * @see HTTP/1.1: Semantics and Content, section 6.4.5 * @deprecated due to security concerns regarding in-band configuration of a proxy */ @Deprecated USE_PROXY(305, "Use Proxy"), /** * {@code 307 Temporary Redirect}. - * @see HTTP/1.1: Semantics and Content, section 6.4.7 + * @see HTTP/1.1: Semantics and Content, section 6.4.7 */ TEMPORARY_REDIRECT(307, "Temporary Redirect"), /** * {@code 308 Permanent Redirect}. - * @see RFC 7238 + * @see RFC 7238 */ PERMANENT_REDIRECT(308, "Permanent Redirect"), @@ -163,78 +163,78 @@ public enum HttpStatus { /** * {@code 400 Bad Request}. - * @see HTTP/1.1: Semantics and Content, section 6.5.1 + * @see HTTP/1.1: Semantics and Content, section 6.5.1 */ BAD_REQUEST(400, "Bad Request"), /** * {@code 401 Unauthorized}. - * @see HTTP/1.1: Authentication, section 3.1 + * @see HTTP/1.1: Authentication, section 3.1 */ UNAUTHORIZED(401, "Unauthorized"), /** * {@code 402 Payment Required}. - * @see HTTP/1.1: Semantics and Content, section 6.5.2 + * @see HTTP/1.1: Semantics and Content, section 6.5.2 */ PAYMENT_REQUIRED(402, "Payment Required"), /** * {@code 403 Forbidden}. - * @see HTTP/1.1: Semantics and Content, section 6.5.3 + * @see HTTP/1.1: Semantics and Content, section 6.5.3 */ FORBIDDEN(403, "Forbidden"), /** * {@code 404 Not Found}. - * @see HTTP/1.1: Semantics and Content, section 6.5.4 + * @see HTTP/1.1: Semantics and Content, section 6.5.4 */ NOT_FOUND(404, "Not Found"), /** * {@code 405 Method Not Allowed}. - * @see HTTP/1.1: Semantics and Content, section 6.5.5 + * @see HTTP/1.1: Semantics and Content, section 6.5.5 */ METHOD_NOT_ALLOWED(405, "Method Not Allowed"), /** * {@code 406 Not Acceptable}. - * @see HTTP/1.1: Semantics and Content, section 6.5.6 + * @see HTTP/1.1: Semantics and Content, section 6.5.6 */ NOT_ACCEPTABLE(406, "Not Acceptable"), /** * {@code 407 Proxy Authentication Required}. - * @see HTTP/1.1: Authentication, section 3.2 + * @see HTTP/1.1: Authentication, section 3.2 */ PROXY_AUTHENTICATION_REQUIRED(407, "Proxy Authentication Required"), /** * {@code 408 Request Timeout}. - * @see HTTP/1.1: Semantics and Content, section 6.5.7 + * @see HTTP/1.1: Semantics and Content, section 6.5.7 */ REQUEST_TIMEOUT(408, "Request Timeout"), /** * {@code 409 Conflict}. - * @see HTTP/1.1: Semantics and Content, section 6.5.8 + * @see HTTP/1.1: Semantics and Content, section 6.5.8 */ CONFLICT(409, "Conflict"), /** * {@code 410 Gone}. - * @see HTTP/1.1: Semantics and Content, section 6.5.9 + * @see HTTP/1.1: Semantics and Content, section 6.5.9 */ GONE(410, "Gone"), /** * {@code 411 Length Required}. - * @see HTTP/1.1: Semantics and Content, section 6.5.10 + * @see HTTP/1.1: Semantics and Content, section 6.5.10 */ LENGTH_REQUIRED(411, "Length Required"), /** * {@code 412 Precondition failed}. - * @see HTTP/1.1: Conditional Requests, section 4.2 + * @see HTTP/1.1: Conditional Requests, section 4.2 */ PRECONDITION_FAILED(412, "Precondition Failed"), /** * {@code 413 Payload Too Large}. * @since 4.1 - * @see HTTP/1.1: Semantics and Content, section 6.5.11 + * @see HTTP/1.1: Semantics and Content, section 6.5.11 */ PAYLOAD_TOO_LARGE(413, "Payload Too Large"), /** * {@code 413 Request Entity Too Large}. - * @see HTTP/1.1, section 10.4.14 + * @see HTTP/1.1, section 10.4.14 * @deprecated In favor of {@link #PAYLOAD_TOO_LARGE} which will be returned from {@code HttpStatus.valueOf(413)} */ @Deprecated @@ -242,84 +242,84 @@ public enum HttpStatus { /** * {@code 414 URI Too Long}. * @since 4.1 - * @see HTTP/1.1: Semantics and Content, section 6.5.12 + * @see HTTP/1.1: Semantics and Content, section 6.5.12 */ URI_TOO_LONG(414, "URI Too Long"), /** * {@code 414 Request-URI Too Long}. - * @see HTTP/1.1, section 10.4.15 + * @see HTTP/1.1, section 10.4.15 * @deprecated In favor of {@link #URI_TOO_LONG} which will be returned from {@code HttpStatus.valueOf(414)} */ @Deprecated REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"), /** * {@code 415 Unsupported Media Type}. - * @see HTTP/1.1: Semantics and Content, section 6.5.13 + * @see HTTP/1.1: Semantics and Content, section 6.5.13 */ UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"), /** * {@code 416 Requested Range Not Satisfiable}. - * @see HTTP/1.1: Range Requests, section 4.4 + * @see HTTP/1.1: Range Requests, section 4.4 */ REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested range not satisfiable"), /** * {@code 417 Expectation Failed}. - * @see HTTP/1.1: Semantics and Content, section 6.5.14 + * @see HTTP/1.1: Semantics and Content, section 6.5.14 */ EXPECTATION_FAILED(417, "Expectation Failed"), /** * {@code 418 I'm a teapot}. - * @see HTCPCP/1.0 + * @see HTCPCP/1.0 */ I_AM_A_TEAPOT(418, "I'm a teapot"), /** - * @deprecated See WebDAV Draft Changes + * @deprecated See WebDAV Draft Changes */ @Deprecated INSUFFICIENT_SPACE_ON_RESOURCE(419, "Insufficient Space On Resource"), /** - * @deprecated See WebDAV Draft Changes + * @deprecated See WebDAV Draft Changes */ @Deprecated METHOD_FAILURE(420, "Method Failure"), /** - * @deprecated See WebDAV Draft Changes + * @deprecated See WebDAV Draft Changes */ @Deprecated DESTINATION_LOCKED(421, "Destination Locked"), /** * {@code 422 Unprocessable Entity}. - * @see WebDAV + * @see WebDAV */ UNPROCESSABLE_ENTITY(422, "Unprocessable Entity"), /** * {@code 423 Locked}. - * @see WebDAV + * @see WebDAV */ LOCKED(423, "Locked"), /** * {@code 424 Failed Dependency}. - * @see WebDAV + * @see WebDAV */ FAILED_DEPENDENCY(424, "Failed Dependency"), /** * {@code 426 Upgrade Required}. - * @see Upgrading to TLS Within HTTP/1.1 + * @see Upgrading to TLS Within HTTP/1.1 */ UPGRADE_REQUIRED(426, "Upgrade Required"), /** * {@code 428 Precondition Required}. - * @see Additional HTTP Status Codes + * @see Additional HTTP Status Codes */ PRECONDITION_REQUIRED(428, "Precondition Required"), /** * {@code 429 Too Many Requests}. - * @see Additional HTTP Status Codes + * @see Additional HTTP Status Codes */ TOO_MANY_REQUESTS(429, "Too Many Requests"), /** * {@code 431 Request Header Fields Too Large}. - * @see Additional HTTP Status Codes + * @see Additional HTTP Status Codes */ REQUEST_HEADER_FIELDS_TOO_LARGE(431, "Request Header Fields Too Large"), @@ -327,47 +327,47 @@ public enum HttpStatus { /** * {@code 500 Internal Server Error}. - * @see HTTP/1.1: Semantics and Content, section 6.6.1 + * @see HTTP/1.1: Semantics and Content, section 6.6.1 */ INTERNAL_SERVER_ERROR(500, "Internal Server Error"), /** * {@code 501 Not Implemented}. - * @see HTTP/1.1: Semantics and Content, section 6.6.2 + * @see HTTP/1.1: Semantics and Content, section 6.6.2 */ NOT_IMPLEMENTED(501, "Not Implemented"), /** * {@code 502 Bad Gateway}. - * @see HTTP/1.1: Semantics and Content, section 6.6.3 + * @see HTTP/1.1: Semantics and Content, section 6.6.3 */ BAD_GATEWAY(502, "Bad Gateway"), /** * {@code 503 Service Unavailable}. - * @see HTTP/1.1: Semantics and Content, section 6.6.4 + * @see HTTP/1.1: Semantics and Content, section 6.6.4 */ SERVICE_UNAVAILABLE(503, "Service Unavailable"), /** * {@code 504 Gateway Timeout}. - * @see HTTP/1.1: Semantics and Content, section 6.6.5 + * @see HTTP/1.1: Semantics and Content, section 6.6.5 */ GATEWAY_TIMEOUT(504, "Gateway Timeout"), /** * {@code 505 HTTP Version Not Supported}. - * @see HTTP/1.1: Semantics and Content, section 6.6.6 + * @see HTTP/1.1: Semantics and Content, section 6.6.6 */ HTTP_VERSION_NOT_SUPPORTED(505, "HTTP Version not supported"), /** * {@code 506 Variant Also Negotiates} - * @see Transparent Content Negotiation + * @see Transparent Content Negotiation */ VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates"), /** * {@code 507 Insufficient Storage} - * @see WebDAV + * @see WebDAV */ INSUFFICIENT_STORAGE(507, "Insufficient Storage"), /** * {@code 508 Loop Detected} - * @see WebDAV Binding Extensions + * @see WebDAV Binding Extensions */ LOOP_DETECTED(508, "Loop Detected"), /** @@ -376,12 +376,12 @@ public enum HttpStatus { BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded"), /** * {@code 510 Not Extended} - * @see HTTP Extension Framework + * @see HTTP Extension Framework */ NOT_EXTENDED(510, "Not Extended"), /** * {@code 511 Network Authentication Required}. - * @see Additional HTTP Status Codes + * @see Additional HTTP Status Codes */ NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required"); diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java index f7b6f179ea1..808e3371d7f 100644 --- a/spring-web/src/main/java/org/springframework/http/MediaType.java +++ b/spring-web/src/main/java/org/springframework/http/MediaType.java @@ -42,7 +42,7 @@ import org.springframework.util.comparator.CompoundComparator; * @author Rossen Stoyanchev * @author Sebastien Deleuze * @since 3.0 - * @see HTTP 1.1: Semantics and Content, section 3.1.1.1 + * @see HTTP 1.1: Semantics and Content, section 3.1.1.1 */ public class MediaType extends MimeType implements Serializable { @@ -446,7 +446,7 @@ public class MediaType extends MimeType implements Serializable { *
    audio/basic == text/html
    *
    audio/basic == audio/wave
    * @param mediaTypes the list of media types to be sorted - * @see HTTP 1.1: Semantics + * @see HTTP 1.1: Semantics * and Content, section 5.3.2 */ public static void sortBySpecificity(List mediaTypes) { diff --git a/spring-web/src/main/java/org/springframework/http/RequestEntity.java b/spring-web/src/main/java/org/springframework/http/RequestEntity.java index 6f8e3133ab0..d2adaaca2be 100644 --- a/spring-web/src/main/java/org/springframework/http/RequestEntity.java +++ b/spring-web/src/main/java/org/springframework/http/RequestEntity.java @@ -32,14 +32,14 @@ import org.springframework.util.ObjectUtils; * {@link org.springframework.web.client.RestTemplate#exchange(RequestEntity, Class) exchange()}: *
      * MyRequest body = ...
    - * RequestEntity<MyRequest> request = RequestEntity.post(new URI("http://example.com/bar")).accept(MediaType.APPLICATION_JSON).body(body);
    + * RequestEntity<MyRequest> request = RequestEntity.post(new URI("https://example.com/bar")).accept(MediaType.APPLICATION_JSON).body(body);
      * ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
      * 
    * *

    If you would like to provide a URI template with variables, consider using * {@link org.springframework.web.util.UriTemplate}: *

    - * URI uri = new UriTemplate("http://example.com/{foo}").expand("bar");
    + * URI uri = new UriTemplate("https://example.com/{foo}").expand("bar");
      * RequestEntity<MyRequest> request = RequestEntity.post(uri).accept(MediaType.APPLICATION_JSON).body(body);
      * 
    * diff --git a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java index 94629583d50..c738c50dd1c 100644 --- a/spring-web/src/main/java/org/springframework/http/ResponseEntity.java +++ b/spring-web/src/main/java/org/springframework/http/ResponseEntity.java @@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils; * {@link org.springframework.web.client.RestTemplate#getForEntity getForEntity()} and * {@link org.springframework.web.client.RestTemplate#exchange exchange()}: *
    - * ResponseEntity<String> entity = template.getForEntity("http://example.com", String.class);
    + * ResponseEntity<String> entity = template.getForEntity("https://example.com", String.class);
      * String body = entity.getBody();
      * MediaType contentType = entity.getHeaders().getContentType();
      * HttpStatus statusCode = entity.getStatusCode();
    diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
    index 33ac96342be..9aa407240a2 100644
    --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
    +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequestFactory.java
    @@ -36,7 +36,7 @@ import org.springframework.util.Assert;
     
     /**
      * Asynchronous extension of the {@link HttpComponentsClientHttpRequestFactory}. Uses
    - * Apache HttpComponents
    + * Apache HttpComponents
      * HttpAsyncClient 4.0 to create requests.
      *
      * @author Arjen Poutsma
    diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java
    index 4f5d43ca9e9..e3766ce1be4 100644
    --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java
    +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactory.java
    @@ -42,7 +42,7 @@ import org.springframework.util.Assert;
     
     /**
      * {@link org.springframework.http.client.ClientHttpRequestFactory} implementation that
    - * uses Apache HttpComponents
    + * uses Apache HttpComponents
      * HttpClient to create requests.
      *
      * 

    Allows to use a pre-configured {@link HttpClient} instance - diff --git a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequestFactory.java index 6be92cdba8a..14ac9365259 100644 --- a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequestFactory.java @@ -41,7 +41,7 @@ import org.springframework.util.Assert; /** * {@link org.springframework.http.client.ClientHttpRequestFactory} implementation that - * uses Netty 4 to create requests. + * uses Netty 4 to create requests. * *

    Allows to use a pre-configured {@link EventLoopGroup} instance - useful for sharing * across multiple clients. diff --git a/spring-web/src/main/java/org/springframework/http/client/OkHttpClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/OkHttpClientHttpRequestFactory.java index d5ccc93d04c..479f7baa1bb 100644 --- a/spring-web/src/main/java/org/springframework/http/client/OkHttpClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/OkHttpClientHttpRequestFactory.java @@ -27,7 +27,7 @@ import org.springframework.util.Assert; /** * {@link ClientHttpRequestFactory} implementation that uses - * OkHttp to create requests. + * OkHttp to create requests. * * @author Luciano Leggieri * @author Arjen Poutsma diff --git a/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java index c041776a041..95a78bb0d86 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java @@ -66,7 +66,7 @@ import org.springframework.util.StringUtils; * form.add("field 1", "value 1"); * form.add("field 2", "value 2"); * form.add("field 2", "value 3"); - * template.postForLocation("http://example.com/myForm", form); + * template.postForLocation("https://example.com/myForm", form); *

    * *

    The following snippet shows how to do a file upload: @@ -74,7 +74,7 @@ import org.springframework.util.StringUtils; * MultiValueMap<String, Object> parts = new LinkedMultiValueMap<String, Object>(); * parts.add("field 1", "value 1"); * parts.add("file", new ClassPathResource("myFile.jpg")); - * template.postForLocation("http://example.com/myFileUpload", parts); + * template.postForLocation("https://example.com/myFileUpload", parts); *

    * *

    Some methods in this class were inspired by @@ -127,7 +127,7 @@ public class FormHttpMessageConverter implements HttpMessageConverterIf not set file names will be encoded as US-ASCII. * @param multipartCharset the charset to use * @since 4.1.1 - * @see Encoded-Word + * @see Encoded-Word */ public void setMultipartCharset(Charset multipartCharset) { this.multipartCharset = multipartCharset; diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java index dac07a6a56e..8ce1b859325 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java @@ -25,7 +25,7 @@ import org.springframework.http.MediaType; /** * Implementation of {@link org.springframework.http.converter.HttpMessageConverter} that can read and - * write JSON using Jackson 2.x's {@link ObjectMapper}. + * write JSON using Jackson 2.x's {@link ObjectMapper}. * *

    This converter can be used to bind to typed beans, or untyped {@code HashMap} instances. * diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java index 8767711684e..c8980c83160 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapClientInterceptor.java @@ -40,7 +40,7 @@ import org.springframework.util.Assert; * *

    Burlap is a slim, XML-based RPC protocol. * For information on Burlap, see the - * Burlap website + * Burlap website * *

    Note: There is no requirement for services accessed with this proxy factory * to have been exported using Spring's {@link BurlapServiceExporter}, as there is diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java index 9cfc40822bd..022039aeaff 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapExporter.java @@ -33,7 +33,7 @@ import org.springframework.util.Assert; * *

    Burlap is a slim, XML-based RPC protocol. * For information on Burlap, see the - * Burlap website. + * Burlap website. * This exporter requires Burlap 3.x. * * @author Juergen Hoeller diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java index 9530cf29379..c57f0e83d35 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapProxyFactoryBean.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.FactoryBean; * *

    Burlap is a slim, XML-based RPC protocol. * For information on Burlap, see the - * Burlap website + * Burlap website * *

    The service URL must be an HTTP URL exposing a Burlap service. * For details, see the {@link BurlapClientInterceptor} javadoc. diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java index 39efb35e7f3..28083de4b9e 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java @@ -34,7 +34,7 @@ import org.springframework.web.util.NestedServletException; * *

    Burlap is a slim, XML-based RPC protocol. * For information on Burlap, see the - * Burlap website. + * Burlap website. * This exporter requires Burlap 3.x. * *

    Note: Burlap services exported with this class can be accessed by diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java index 04af59064bc..60c3c43ccfe 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java @@ -44,7 +44,7 @@ import org.springframework.util.Assert; * *

    Hessian is a slim, binary RPC protocol. * For information on Hessian, see the - * Hessian website + * Hessian website * Note: As of Spring 4.0, this client requires Hessian 4.0 or above. * *

    Note: There is no requirement for services accessed with this proxy factory diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java index b808443f9f9..f4e94b30f0c 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java @@ -45,7 +45,7 @@ import org.springframework.util.CommonsLogWriter; * *

    Hessian is a slim, binary RPC protocol. * For information on Hessian, see the - * Hessian website. + * Hessian website. * Note: As of Spring 4.0, this exporter requires Hessian 4.0 or above. * * @author Juergen Hoeller diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java index 7c594329830..961eb366b91 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianProxyFactoryBean.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.FactoryBean; * *

    Hessian is a slim, binary RPC protocol. * For information on Hessian, see the - * Hessian website + * Hessian website * Note: As of Spring 4.0, this proxy factory requires Hessian 4.0 or above. * *

    The service URL must be an HTTP URL exposing a Hessian service. diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java index ff57f70f532..7d8aecc2866 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java @@ -34,7 +34,7 @@ import org.springframework.web.util.NestedServletException; * *

    Hessian is a slim, binary RPC protocol. * For information on Hessian, see the - * Hessian website. + * Hessian website. * Note: As of Spring 4.0, this exporter requires Hessian 4.0 or above. * *

    Hessian services exported with this class can be accessed by diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java index 1dd0e16d3ab..67e7a35f0df 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleBurlapServiceExporter.java @@ -33,7 +33,7 @@ import org.springframework.util.FileCopyUtils; * *

    Burlap is a slim, XML-based RPC protocol. * For information on Burlap, see the - * Burlap website. + * Burlap website. * This exporter requires Burlap 3.x. * *

    Note: Burlap services exported with this class can be accessed by diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java index 967622ae436..96c27722cdd 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java @@ -33,7 +33,7 @@ import org.springframework.util.FileCopyUtils; * *

    Hessian is a slim, binary RPC protocol. * For information on Hessian, see the - * Hessian website. + * Hessian website. * Note: As of Spring 4.0, this exporter requires Hessian 4.0 or above. * *

    Hessian services exported with this class can be accessed by diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java index e630835f262..6dba86bc3be 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java @@ -5,6 +5,6 @@ * *

    Hessian is a slim, binary RPC protocol over HTTP. * For information on Hessian, see the - * Hessian website + * Hessian website */ package org.springframework.remoting.caucho; diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java index 1e1b16c9b08..ac3bb260f43 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java @@ -47,7 +47,7 @@ import org.springframework.util.StringUtils; /** * {@link org.springframework.remoting.httpinvoker.HttpInvokerRequestExecutor} implementation that uses - * Apache HttpComponents HttpClient + * Apache HttpComponents HttpClient * to execute POST requests. * *

    Allows to use a pre-configured {@link org.apache.http.client.HttpClient} diff --git a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java index 02c1688c3b2..3dc0787c010 100644 --- a/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java +++ b/spring-web/src/main/java/org/springframework/web/SpringServletContainerInitializer.java @@ -41,7 +41,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; * the JAR Services API {@link ServiceLoader#load(Class)} method detecting the * {@code spring-web} module's {@code META-INF/services/javax.servlet.ServletContainerInitializer} * service provider configuration file. See the - * + * * JAR Services API documentation as well as section 8.2.4 of the Servlet 3.0 * Final Draft specification for complete details. * diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java index a9149592291..756bac9d153 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/CrossOrigin.java @@ -55,7 +55,7 @@ public @interface CrossOrigin { String[] value() default {}; /** - * List of allowed origins, e.g. {@code "http://domain1.com"}. + * List of allowed origins, e.g. {@code "https://domain1.com"}. *

    These values are placed in the {@code Access-Control-Allow-Origin} * header of both the pre-flight response and the actual response. * {@code "*"} means that all origins are allowed. diff --git a/spring-web/src/main/java/org/springframework/web/client/AsyncRestOperations.java b/spring-web/src/main/java/org/springframework/web/client/AsyncRestOperations.java index 5e1c38d1205..807bf09ce4c 100644 --- a/spring-web/src/main/java/org/springframework/web/client/AsyncRestOperations.java +++ b/spring-web/src/main/java/org/springframework/web/client/AsyncRestOperations.java @@ -345,7 +345,7 @@ public interface AsyncRestOperations { * information: *

     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) @@ -366,7 +366,7 @@ public interface AsyncRestOperations { * information: *
     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) @@ -387,7 +387,7 @@ public interface AsyncRestOperations { * information: *
     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) diff --git a/spring-web/src/main/java/org/springframework/web/client/MessageBodyClientHttpResponseWrapper.java b/spring-web/src/main/java/org/springframework/web/client/MessageBodyClientHttpResponseWrapper.java index ab32db64bdd..589bfe27386 100644 --- a/spring-web/src/main/java/org/springframework/web/client/MessageBodyClientHttpResponseWrapper.java +++ b/spring-web/src/main/java/org/springframework/web/client/MessageBodyClientHttpResponseWrapper.java @@ -31,7 +31,7 @@ import org.springframework.http.client.ClientHttpResponse; * * @author Brian Clozel * @since 4.1.5 - * @see rfc7230 Section 3.3.3 + * @see rfc7230 Section 3.3.3 */ class MessageBodyClientHttpResponseWrapper implements ClientHttpResponse { diff --git a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java index ed145f6074a..22daa72bddf 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java @@ -411,7 +411,7 @@ public interface RestOperations { * The given {@link ParameterizedTypeReference} is used to pass generic type information: *
     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) @@ -431,7 +431,7 @@ public interface RestOperations { * The given {@link ParameterizedTypeReference} is used to pass generic type information: *
     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) @@ -450,7 +450,7 @@ public interface RestOperations { * The given {@link ParameterizedTypeReference} is used to pass generic type information: *
     	 * ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
    -	 * ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
    +	 * ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
     	 * 
    * @param url the URL * @param method the HTTP method (GET, POST, etc) @@ -468,7 +468,7 @@ public interface RestOperations { * with the static builder methods on {@code RequestEntity}, for instance: *
     	 * MyRequest body = ...
    -	 * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
    +	 * RequestEntity request = RequestEntity.post(new URI("https://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
     	 * ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
     	 * 
    * @param requestEntity the entity to write to the request @@ -484,7 +484,7 @@ public interface RestOperations { * {@link ParameterizedTypeReference} is used to pass generic type information: *
     	 * MyRequest body = ...
    -	 * RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
    +	 * RequestEntity request = RequestEntity.post(new URI("https://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
     	 * ParameterizedTypeReference<List<MyResponse>> myBean = new ParameterizedTypeReference<List<MyResponse>>() {};
     	 * ResponseEntity<List<MyResponse>> response = template.exchange(request, myBean);
     	 * 
    diff --git a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java index 8e118b6e1a1..1d4aa4ab09a 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestTemplate.java @@ -87,11 +87,11 @@ import org.springframework.web.util.UriTemplateHandler; *

    For each HTTP method there are three variants: two accept a URI template string * and URI variables (array or map) while a third accepts a {@link URI}. * Note that for URI templates it is assumed encoding is necessary, e.g. - * {@code restTemplate.getForObject("http://example.com/hotel list")} becomes - * {@code "http://example.com/hotel%20list"}. This also means if the URI template + * {@code restTemplate.getForObject("https://example.com/hotel list")} becomes + * {@code "https://example.com/hotel%20list"}. This also means if the URI template * or URI variables are already encoded, double encoding will occur, e.g. - * {@code http://example.com/hotel%20list} becomes - * {@code http://example.com/hotel%2520list}). To avoid that use a {@code URI} method + * {@code https://example.com/hotel%20list} becomes + * {@code https://example.com/hotel%2520list}). To avoid that use a {@code URI} method * variant to provide (or re-use) a previously encoded URI. To prepare such an URI * with full control over encoding, consider using * {@link org.springframework.web.util.UriComponentsBuilder}. diff --git a/spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java b/spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java index 9be3b462a82..6d1d5361087 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java +++ b/spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java @@ -33,7 +33,7 @@ import org.springframework.util.StringUtils; * @author Rossen Stoyanchev * @author Sam Brannen * @since 4.2 - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public class CorsConfiguration { @@ -116,7 +116,7 @@ public class CorsConfiguration { /** - * Set the origins to allow, e.g. {@code "http://domain1.com"}. + * Set the origins to allow, e.g. {@code "https://domain1.com"}. *

    The special value {@code "*"} allows all domains. *

    By default this is not set. */ diff --git a/spring-web/src/main/java/org/springframework/web/cors/CorsProcessor.java b/spring-web/src/main/java/org/springframework/web/cors/CorsProcessor.java index 4d07b139a1c..e9879ade9a4 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/CorsProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/cors/CorsProcessor.java @@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletResponse; * @author Sebastien Deleuze * @author Rossen Stoyanchev * @since 4.2 - * @see CORS W3C recommandation + * @see CORS W3C recommandation * @see org.springframework.web.servlet.handler.AbstractHandlerMapping#setCorsProcessor */ public interface CorsProcessor { diff --git a/spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java b/spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java index a64bcce9774..56234b85f8c 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java +++ b/spring-web/src/main/java/org/springframework/web/cors/CorsUtils.java @@ -23,7 +23,7 @@ import org.springframework.http.HttpMethod; /** * Utility class for CORS request handling based on the - * CORS W3C recommandation. + * CORS W3C recommandation. * * @author Sebastien Deleuze * @since 4.2 diff --git a/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java b/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java index 2b1abdf39f4..a03f8ccdf4a 100644 --- a/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java +++ b/spring-web/src/main/java/org/springframework/web/cors/DefaultCorsProcessor.java @@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils; /** * The default implementation of {@link CorsProcessor}, as defined by the - * CORS W3C recommendation. + * CORS W3C recommendation. * *

    Note that when input {@link CorsConfiguration} is {@code null}, this * implementation does not reject simple or actual requests outright but simply diff --git a/spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java b/spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java index 658bc50bb6e..d85fce5505a 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/CorsFilter.java @@ -48,7 +48,7 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource; * * @author Sebastien Deleuze * @since 4.2 - * @see CORS W3C recommendation + * @see CORS W3C recommendation */ public class CorsFilter extends OncePerRequestFilter { diff --git a/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java index aeb0542b3fa..c8d7b642391 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/MultipartResolver.java @@ -20,7 +20,7 @@ import javax.servlet.http.HttpServletRequest; /** * A strategy interface for multipart file upload resolution in accordance - * with RFC 1867. + * with RFC 1867. * Implementations are typically usable both within an application context * and standalone. * diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java index 9fea4a4220c..ee7b2f6f9b9 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartResolver.java @@ -38,7 +38,7 @@ import org.springframework.web.util.WebUtils; /** * Servlet-based {@link MultipartResolver} implementation for - * Apache Commons FileUpload + * Apache Commons FileUpload * 1.2 or above. * *

    Provides "maxUploadSize", "maxInMemorySize" and "defaultEncoding" settings as diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java index 001283a1fe9..fbc333b974f 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java @@ -1,5 +1,5 @@ /** * MultipartResolver implementation for - * Apache Commons FileUpload. + * Apache Commons FileUpload. */ package org.springframework.web.multipart.commons; diff --git a/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java b/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java index 9e1f518215b..4c4abe7a639 100644 --- a/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java +++ b/spring-web/src/main/java/org/springframework/web/util/HierarchicalUriComponents.java @@ -42,7 +42,7 @@ import org.springframework.util.StringUtils; * @author Rossen Stoyanchev * @author Phillip Webb * @since 3.1.3 - * @see Hierarchical URIs + * @see Hierarchical URIs */ @SuppressWarnings("serial") final class HierarchicalUriComponents extends UriComponents { @@ -480,7 +480,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Enumeration used to identify the allowed characters per URI component. *

    Contains methods to indicate whether a given character is valid in a specific URI component. - * @see RFC 3986 + * @see RFC 3986 */ enum Type { @@ -570,7 +570,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code ALPHA} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isAlpha(int c) { return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z'; @@ -578,7 +578,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code DIGIT} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isDigit(int c) { return c >= '0' && c <= '9'; @@ -586,7 +586,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code gen-delims} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isGenericDelimiter(int c) { return ':' == c || '/' == c || '?' == c || '#' == c || '[' == c || ']' == c || '@' == c; @@ -594,7 +594,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code sub-delims} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isSubDelimiter(int c) { return '!' == c || '$' == c || '&' == c || '\'' == c || '(' == c || ')' == c || '*' == c || '+' == c || @@ -603,7 +603,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code reserved} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isReserved(int c) { return isGenericDelimiter(c) || isSubDelimiter(c); @@ -611,7 +611,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code unreserved} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isUnreserved(int c) { return isAlpha(c) || isDigit(c) || '-' == c || '.' == c || '_' == c || '~' == c; @@ -619,7 +619,7 @@ final class HierarchicalUriComponents extends UriComponents { /** * Indicates whether the given character is in the {@code pchar} set. - * @see RFC 3986, appendix A + * @see RFC 3986, appendix A */ protected boolean isPchar(int c) { return isUnreserved(c) || isSubDelimiter(c) || ':' == c || '@' == c; diff --git a/spring-web/src/main/java/org/springframework/web/util/OpaqueUriComponents.java b/spring-web/src/main/java/org/springframework/web/util/OpaqueUriComponents.java index be329162c8e..115b8a07dc3 100644 --- a/spring-web/src/main/java/org/springframework/web/util/OpaqueUriComponents.java +++ b/spring-web/src/main/java/org/springframework/web/util/OpaqueUriComponents.java @@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils; * @author Arjen Poutsma * @author Phillip Webb * @since 3.2 - * @see Hierarchical vs Opaque URIs + * @see Hierarchical vs Opaque URIs */ @SuppressWarnings("serial") final class OpaqueUriComponents extends UriComponents { diff --git a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java index ad62b20eb66..8a914cd7f5d 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java @@ -274,7 +274,7 @@ public class UriComponentsBuilder implements Cloneable { /** * Create a new {@code UriComponents} object from the URI associated with * the given HttpRequest while also overlaying with values from the headers - * "Forwarded" (RFC 7239, + * "Forwarded" (RFC 7239, * or "X-Forwarded-Host", "X-Forwarded-Port", and "X-Forwarded-Proto" if * "Forwarded" is not found. * @param request the source request @@ -664,7 +664,7 @@ public class UriComponentsBuilder implements Cloneable { /** * Adapt this builder's scheme+host+port from the given headers, specifically - * "Forwarded" (RFC 7239, + * "Forwarded" (RFC 7239, * or "X-Forwarded-Host", "X-Forwarded-Port", and "X-Forwarded-Proto" if * "Forwarded" is not found. * @param headers the HTTP headers to consider diff --git a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java index 8c977986371..428ac545769 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriTemplate.java @@ -39,7 +39,7 @@ import org.springframework.util.Assert; * @author Juergen Hoeller * @author Rossen Stoyanchev * @since 3.0 - * @see URI Templates + * @see URI Templates */ @SuppressWarnings("serial") public class UriTemplate implements Serializable { @@ -81,13 +81,13 @@ public class UriTemplate implements Serializable { * the Map values variable values. The order of variables is not significant. *

    Example: *

    -	 * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
    +	 * UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}");
     	 * Map<String, String> uriVariables = new HashMap<String, String>();
     	 * uriVariables.put("booking", "42");
     	 * uriVariables.put("hotel", "Rest & Relax");
     	 * System.out.println(template.expand(uriVariables));
     	 * 
    - * will print:
    {@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}
    + * will print:
    {@code https://example.com/hotels/Rest%20%26%20Relax/bookings/42}
    * @param uriVariables the map of URI variables * @return the expanded URI * @throws IllegalArgumentException if {@code uriVariables} is {@code null}; @@ -104,10 +104,10 @@ public class UriTemplate implements Serializable { * The order of variables is significant. *

    Example: *

    -     * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
    +     * UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}");
          * System.out.println(template.expand("Rest & Relax", 42));
          * 
    - * will print:
    {@code http://example.com/hotels/Rest%20%26%20Relax/bookings/42}
    + * will print:
    {@code https://example.com/hotels/Rest%20%26%20Relax/bookings/42}
    * @param uriVariableValues the array of URI variables * @return the expanded URI * @throws IllegalArgumentException if {@code uriVariables} is {@code null} @@ -137,8 +137,8 @@ public class UriTemplate implements Serializable { * values are variable values, as occurred in the given URI. *

    Example: *

    -	 * UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
    -	 * System.out.println(template.match("http://example.com/hotels/1/bookings/42"));
    +	 * UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}");
    +	 * System.out.println(template.match("https://example.com/hotels/1/bookings/42"));
     	 * 
    * will print:
    {@code {hotel=1, booking=42}}
    * @param uri the URI to match to diff --git a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java index b07fbb02ac9..42df5303678 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java @@ -35,7 +35,7 @@ import org.springframework.util.Assert; * * @author Arjen Poutsma * @since 3.0 - * @see RFC 3986 + * @see RFC 3986 */ public abstract class UriUtils { diff --git a/spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java b/spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java index f2357e992e6..1581510deaf 100644 --- a/spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java +++ b/spring-web/src/test/java/org/springframework/http/HttpHeadersTests.java @@ -110,10 +110,10 @@ public class HttpHeadersTests { @Test public void location() throws URISyntaxException { - URI location = new URI("http://www.example.com/hotels"); + URI location = new URI("https://www.example.com/hotels"); headers.setLocation(location); assertEquals("Invalid Location header", location, headers.getLocation()); - assertEquals("Invalid Location header", "http://www.example.com/hotels", headers.getFirst("Location")); + assertEquals("Invalid Location header", "https://www.example.com/hotels", headers.getFirst("Location")); } @Test diff --git a/spring-web/src/test/java/org/springframework/http/RequestEntityTests.java b/spring-web/src/test/java/org/springframework/http/RequestEntityTests.java index 8464ace6f35..9d84f9151d9 100644 --- a/spring-web/src/test/java/org/springframework/http/RequestEntityTests.java +++ b/spring-web/src/test/java/org/springframework/http/RequestEntityTests.java @@ -39,7 +39,7 @@ public class RequestEntityTests { public void normal() throws URISyntaxException { String headerName = "My-Custom-Header"; String headerValue = "HeaderValue"; - URI url = new URI("http://example.com"); + URI url = new URI("https://example.com"); Integer entity = 42; RequestEntity requestEntity = @@ -55,13 +55,13 @@ public class RequestEntityTests { @Test public void uriVariablesExpansion() throws URISyntaxException { - URI uri = new UriTemplate("http://example.com/{foo}").expand("bar"); + URI uri = new UriTemplate("https://example.com/{foo}").expand("bar"); RequestEntity.get(uri).accept(MediaType.TEXT_PLAIN).build(); String url = "http://www.{host}.com/{path}"; String host = "example"; String path = "foo/bar"; - URI expected = new URI("http://www.example.com/foo/bar"); + URI expected = new URI("https://www.example.com/foo/bar"); uri = new UriTemplate(url).expand(host, path); RequestEntity entity = RequestEntity.get(uri).build(); @@ -78,7 +78,7 @@ public class RequestEntityTests { @Test public void get() { - RequestEntity requestEntity = RequestEntity.get(URI.create("http://example.com")).accept( + RequestEntity requestEntity = RequestEntity.get(URI.create("https://example.com")).accept( MediaType.IMAGE_GIF, MediaType.IMAGE_JPEG, MediaType.IMAGE_PNG).build(); assertNotNull(requestEntity); @@ -97,7 +97,7 @@ public class RequestEntityTests { long contentLength = 67890; MediaType contentType = MediaType.TEXT_PLAIN; - RequestEntity responseEntity = RequestEntity.post(new URI("http://example.com")). + RequestEntity responseEntity = RequestEntity.post(new URI("https://example.com")). accept(accept). acceptCharset(charset). ifModifiedSince(ifModifiedSince). @@ -108,7 +108,7 @@ public class RequestEntityTests { assertNotNull(responseEntity); assertEquals(HttpMethod.POST, responseEntity.getMethod()); - assertEquals(new URI("http://example.com"), responseEntity.getUrl()); + assertEquals(new URI("https://example.com"), responseEntity.getUrl()); HttpHeaders responseHeaders = responseEntity.getHeaders(); assertEquals("text/plain", responseHeaders.getFirst("Accept")); @@ -123,7 +123,7 @@ public class RequestEntityTests { @Test public void methods() throws URISyntaxException { - URI url = new URI("http://example.com"); + URI url = new URI("https://example.com"); RequestEntity entity = RequestEntity.get(url).build(); assertEquals(HttpMethod.GET, entity.getMethod()); diff --git a/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java index e9498908f1e..b7cb4b68d38 100644 --- a/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java @@ -46,7 +46,7 @@ public class BufferedSimpleHttpRequestFactoryTests extends AbstractHttpRequestFa @Test public void prepareConnectionWithRequestBody() throws Exception { - URL uri = new URL("http://example.com"); + URL uri = new URL("https://example.com"); testRequestBodyAllowed(uri, "GET", false); testRequestBodyAllowed(uri, "HEAD", false); testRequestBodyAllowed(uri, "OPTIONS", false); @@ -58,7 +58,7 @@ public class BufferedSimpleHttpRequestFactoryTests extends AbstractHttpRequestFa @Test public void deleteWithoutBodyDoesNotRaiseException() throws Exception { - HttpURLConnection connection = new TestHttpURLConnection(new URL("http://example.com")); + HttpURLConnection connection = new TestHttpURLConnection(new URL("https://example.com")); ((SimpleClientHttpRequestFactory) this.factory).prepareConnection(connection, "DELETE"); SimpleBufferingClientHttpRequest request = new SimpleBufferingClientHttpRequest(connection, false); request.execute(); diff --git a/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java index a0c773a144f..21b77604a0d 100644 --- a/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java @@ -164,7 +164,7 @@ public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpReq @Test public void createHttpUriRequest() throws Exception { - URI uri = new URI("http://example.com"); + URI uri = new URI("https://example.com"); testRequestBodyAllowed(uri, HttpMethod.GET, false); testRequestBodyAllowed(uri, HttpMethod.HEAD, false); testRequestBodyAllowed(uri, HttpMethod.OPTIONS, false); diff --git a/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java index 48c6052d625..3e49573703e 100644 --- a/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java @@ -65,7 +65,7 @@ public class InterceptingClientHttpRequestFactoryTests { interceptors.add(new NoOpInterceptor()); requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, interceptors); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); ClientHttpResponse response = request.execute(); assertTrue(((NoOpInterceptor) interceptors.get(0)).invoked); @@ -89,7 +89,7 @@ public class InterceptingClientHttpRequestFactoryTests { interceptors.add(new NoOpInterceptor()); requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, interceptors); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); ClientHttpResponse response = request.execute(); assertFalse(((NoOpInterceptor) interceptors.get(1)).invoked); @@ -128,13 +128,13 @@ public class InterceptingClientHttpRequestFactoryTests { requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, Collections.singletonList(interceptor)); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); request.execute(); } @Test public void changeURI() throws Exception { - final URI changedUri = new URI("http://example.com/2"); + final URI changedUri = new URI("https://example.com/2"); ClientHttpRequestInterceptor interceptor = new ClientHttpRequestInterceptor() { @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) @@ -161,7 +161,7 @@ public class InterceptingClientHttpRequestFactoryTests { requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, Collections.singletonList(interceptor)); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); request.execute(); } @@ -194,7 +194,7 @@ public class InterceptingClientHttpRequestFactoryTests { requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, Collections.singletonList(interceptor)); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); request.execute(); } @@ -213,7 +213,7 @@ public class InterceptingClientHttpRequestFactoryTests { requestFactory = new InterceptingClientHttpRequestFactory(requestFactoryMock, Collections.singletonList(interceptor)); - ClientHttpRequest request = requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET); + ClientHttpRequest request = requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET); request.execute(); assertTrue(Arrays.equals(changedBody, requestMock.body.toByteArray())); } diff --git a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java index ab7f86ffa8e..aa1335910e3 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java @@ -89,7 +89,7 @@ public class RssChannelHttpMessageConverterTests { public void write() throws IOException, SAXException { Channel channel = new Channel("rss_2.0"); channel.setTitle("title"); - channel.setLink("http://example.com"); + channel.setLink("https://example.com"); channel.setDescription("description"); Item item1 = new Item(); @@ -109,7 +109,7 @@ public class RssChannelHttpMessageConverterTests { assertEquals("Invalid content-type", new MediaType("application", "rss+xml", utf8), outputMessage.getHeaders().getContentType()); String expected = "" + - "titlehttp://example.comdescription" + + "titlehttps://example.comdescription" + "title1" + "title2" + ""; @@ -120,7 +120,7 @@ public class RssChannelHttpMessageConverterTests { public void writeOtherCharset() throws IOException, SAXException { Channel channel = new Channel("rss_2.0"); channel.setTitle("title"); - channel.setLink("http://example.com"); + channel.setLink("https://example.com"); channel.setDescription("description"); String encoding = "ISO-8859-1"; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java index 1cf624325ad..97b2224c0ce 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java @@ -119,7 +119,7 @@ public class Jaxb2RootElementHttpMessageConverterTests { @Test public void readXmlRootElementExternalEntityDisabled() throws Exception { Resource external = new ClassPathResource("external.txt", getClass()); - String content = "\n" + " ]>" + " &ext;"; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java index 7f48f012816..7a845b5ce62 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java @@ -146,7 +146,7 @@ public class MappingJackson2XmlHttpMessageConverterTests { @Test public void readWithExternalReference() throws IOException { - String body = "\n" + " (); Resource external = new ClassPathResource("external.txt", getClass()); - bodyExternal = "\n" + " ]>&ext;"; } diff --git a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java index c958b697f57..cfdc888cbd1 100644 --- a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java @@ -56,7 +56,7 @@ public class ServletServerHttpRequestTests { @Test public void getURI() throws Exception { - URI uri = new URI("http://example.com/path?query"); + URI uri = new URI("https://example.com/path?query"); mockRequest.setServerName(uri.getHost()); mockRequest.setServerPort(uri.getPort()); mockRequest.setRequestURI(uri.getPath()); diff --git a/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java b/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java index d84d15b489d..87d2ead3ee3 100644 --- a/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java @@ -80,7 +80,7 @@ public class RestTemplateTests { @Test public void varArgsTemplateVariables() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com/hotels/42/bookings/21"), HttpMethod.GET)) + given(requestFactory.createRequest(new URI("https://example.com/hotels/42/bookings/21"), HttpMethod.GET)) .willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); @@ -88,7 +88,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.execute("http://example.com/hotels/{hotel}/bookings/{booking}", HttpMethod.GET, null, null, "42", + template.execute("https://example.com/hotels/{hotel}/bookings/{booking}", HttpMethod.GET, null, null, "42", "21"); verify(response).close(); @@ -96,7 +96,7 @@ public class RestTemplateTests { @Test public void varArgsNullTemplateVariable() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com/-foo"), HttpMethod.GET)) + given(requestFactory.createRequest(new URI("https://example.com/-foo"), HttpMethod.GET)) .willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); @@ -104,14 +104,14 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.execute("http://example.com/{first}-{last}", HttpMethod.GET, null, null, null, "foo"); + template.execute("https://example.com/{first}-{last}", HttpMethod.GET, null, null, null, "foo"); verify(response).close(); } @Test public void mapTemplateVariables() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com/hotels/42/bookings/42"), HttpMethod.GET)) + given(requestFactory.createRequest(new URI("https://example.com/hotels/42/bookings/42"), HttpMethod.GET)) .willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); @@ -120,14 +120,14 @@ public class RestTemplateTests { given(response.getStatusText()).willReturn(status.getReasonPhrase()); Map vars = Collections.singletonMap("hotel", "42"); - template.execute("http://example.com/hotels/{hotel}/bookings/{hotel}", HttpMethod.GET, null, null, vars); + template.execute("https://example.com/hotels/{hotel}/bookings/{hotel}", HttpMethod.GET, null, null, vars); verify(response).close(); } @Test public void mapNullTemplateVariable() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com/-foo"), HttpMethod.GET)) + given(requestFactory.createRequest(new URI("https://example.com/-foo"), HttpMethod.GET)) .willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); @@ -138,14 +138,14 @@ public class RestTemplateTests { Map vars = new HashMap(2); vars.put("first", null); vars.put("last", "foo"); - template.execute("http://example.com/{first}-{last}", HttpMethod.GET, null, null, vars); + template.execute("https://example.com/{first}-{last}", HttpMethod.GET, null, null, vars); verify(response).close(); } @Test public void errorHandling() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET)).willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(true); given(response.getStatusCode()).willReturn(HttpStatus.INTERNAL_SERVER_ERROR); @@ -153,7 +153,7 @@ public class RestTemplateTests { willThrow(new HttpServerErrorException(HttpStatus.INTERNAL_SERVER_ERROR)).given(errorHandler).handleError(response); try { - template.execute("http://example.com", HttpMethod.GET, null, null); + template.execute("https://example.com", HttpMethod.GET, null, null); fail("HttpServerErrorException expected"); } catch (HttpServerErrorException ex) { @@ -168,7 +168,7 @@ public class RestTemplateTests { given(converter.canRead(String.class, null)).willReturn(true); MediaType textPlain = new MediaType("text", "plain"); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -186,7 +186,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - String result = template.getForObject("http://example.com", String.class); + String result = template.getForObject("https://example.com", String.class); assertEquals("Invalid GET result", expected, result); assertEquals("Invalid Accept header", textPlain.toString(), requestHeaders.getFirst("Accept")); @@ -198,7 +198,7 @@ public class RestTemplateTests { given(converter.canRead(String.class, null)).willReturn(true); MediaType supportedMediaType = new MediaType("foo", "bar"); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(supportedMediaType)); - given(requestFactory.createRequest(new URI("http://example.com/resource"), HttpMethod.GET)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com/resource"), HttpMethod.GET)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -216,7 +216,7 @@ public class RestTemplateTests { given(response.getStatusText()).willReturn(status.getReasonPhrase()); try { - template.getForObject("http://example.com/{p}", String.class, "resource"); + template.getForObject("https://example.com/{p}", String.class, "resource"); fail("UnsupportedMediaTypeException expected"); } catch (RestClientException ex) { @@ -232,7 +232,7 @@ public class RestTemplateTests { given(converter.canRead(String.class, null)).willReturn(true); MediaType textPlain = new MediaType("text", "plain"); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.GET)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.GET)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -251,7 +251,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - ResponseEntity result = template.getForEntity("http://example.com", String.class); + ResponseEntity result = template.getForEntity("https://example.com", String.class); assertEquals("Invalid GET result", expected, result.getBody()); assertEquals("Invalid Accept header", textPlain.toString(), requestHeaders.getFirst("Accept")); assertEquals("Invalid Content-Type header", textPlain, result.getHeaders().getContentType()); @@ -267,7 +267,7 @@ public class RestTemplateTests { uriTemplateHandler.setParsePath(true); template.setUriTemplateHandler(uriTemplateHandler); - URI expectedUri = new URI("http://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150"); + URI expectedUri = new URI("https://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150"); given(requestFactory.createRequest(expectedUri, HttpMethod.GET)).willReturn(request); given(request.getHeaders()).willReturn(new HttpHeaders()); @@ -283,7 +283,7 @@ public class RestTemplateTests { uriVariables.put("publicpath", "pics/logo.png"); uriVariables.put("scale", "150x150"); - String url = "http://example.com/hotels/{hotel}/pic/{publicpath}/size/{scale}"; + String url = "https://example.com/hotels/{hotel}/pic/{publicpath}/size/{scale}"; template.getForObject(url, String.class, uriVariables); verify(response).close(); @@ -292,7 +292,7 @@ public class RestTemplateTests { @Test public void headForHeaders() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.HEAD)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.HEAD)).willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpHeaders responseHeaders = new HttpHeaders(); @@ -301,7 +301,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - HttpHeaders result = template.headForHeaders("http://example.com"); + HttpHeaders result = template.headForHeaders("https://example.com"); assertSame("Invalid headers returned", responseHeaders, result); @@ -310,21 +310,21 @@ public class RestTemplateTests { @Test public void postForLocation() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); String helloWorld = "Hello World"; given(converter.canWrite(String.class, null)).willReturn(true); converter.write(helloWorld, null, request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpHeaders responseHeaders = new HttpHeaders(); - URI expected = new URI("http://example.com/hotels"); + URI expected = new URI("https://example.com/hotels"); responseHeaders.setLocation(expected); given(response.getHeaders()).willReturn(responseHeaders); HttpStatus status = HttpStatus.OK; given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - URI result = template.postForLocation("http://example.com", helloWorld); + URI result = template.postForLocation("https://example.com", helloWorld); assertEquals("Invalid POST result", expected, result); verify(response).close(); @@ -332,7 +332,7 @@ public class RestTemplateTests { @Test public void postForLocationEntityContentType() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); String helloWorld = "Hello World"; MediaType contentType = MediaType.TEXT_PLAIN; given(converter.canWrite(String.class, contentType)).willReturn(true); @@ -342,7 +342,7 @@ public class RestTemplateTests { given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpHeaders responseHeaders = new HttpHeaders(); - URI expected = new URI("http://example.com/hotels"); + URI expected = new URI("https://example.com/hotels"); responseHeaders.setLocation(expected); given(response.getHeaders()).willReturn(responseHeaders); HttpStatus status = HttpStatus.OK; @@ -353,7 +353,7 @@ public class RestTemplateTests { entityHeaders.setContentType(contentType); HttpEntity entity = new HttpEntity(helloWorld, entityHeaders); - URI result = template.postForLocation("http://example.com", entity); + URI result = template.postForLocation("https://example.com", entity); assertEquals("Invalid POST result", expected, result); verify(response).close(); @@ -361,7 +361,7 @@ public class RestTemplateTests { @Test public void postForLocationEntityCustomHeader() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); String helloWorld = "Hello World"; given(converter.canWrite(String.class, null)).willReturn(true); HttpHeaders requestHeaders = new HttpHeaders(); @@ -370,7 +370,7 @@ public class RestTemplateTests { given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpHeaders responseHeaders = new HttpHeaders(); - URI expected = new URI("http://example.com/hotels"); + URI expected = new URI("https://example.com/hotels"); responseHeaders.setLocation(expected); given(response.getHeaders()).willReturn(responseHeaders); HttpStatus status = HttpStatus.OK; @@ -381,7 +381,7 @@ public class RestTemplateTests { entityHeaders.set("MyHeader", "MyValue"); HttpEntity entity = new HttpEntity(helloWorld, entityHeaders); - URI result = template.postForLocation("http://example.com", entity); + URI result = template.postForLocation("https://example.com", entity); assertEquals("Invalid POST result", expected, result); assertEquals("No custom header set", "MyValue", requestHeaders.getFirst("MyHeader")); @@ -390,7 +390,7 @@ public class RestTemplateTests { @Test public void postForLocationNoLocation() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); String helloWorld = "Hello World"; given(converter.canWrite(String.class, null)).willReturn(true); converter.write(helloWorld, null, request); @@ -402,7 +402,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - URI result = template.postForLocation("http://example.com", helloWorld); + URI result = template.postForLocation("https://example.com", helloWorld); assertNull("Invalid POST result", result); verify(response).close(); @@ -410,7 +410,7 @@ public class RestTemplateTests { @Test public void postForLocationNull() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -421,7 +421,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.postForLocation("http://example.com", null); + template.postForLocation("https://example.com", null); assertEquals("Invalid content length", 0, requestHeaders.getContentLength()); verify(response).close(); @@ -432,7 +432,7 @@ public class RestTemplateTests { MediaType textPlain = new MediaType("text", "plain"); given(converter.canRead(Integer.class, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(this.request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(this.request); HttpHeaders requestHeaders = new HttpHeaders(); given(this.request.getHeaders()).willReturn(requestHeaders); String request = "Hello World"; @@ -453,7 +453,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - Integer result = template.postForObject("http://example.com", request, Integer.class); + Integer result = template.postForObject("https://example.com", request, Integer.class); assertEquals("Invalid POST result", expected, result); assertEquals("Invalid Accept header", textPlain.toString(), requestHeaders.getFirst("Accept")); @@ -465,7 +465,7 @@ public class RestTemplateTests { MediaType textPlain = new MediaType("text", "plain"); given(converter.canRead(Integer.class, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(this.request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(this.request); HttpHeaders requestHeaders = new HttpHeaders(); given(this.request.getHeaders()).willReturn(requestHeaders); String request = "Hello World"; @@ -487,7 +487,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - ResponseEntity result = template.postForEntity("http://example.com", request, Integer.class); + ResponseEntity result = template.postForEntity("https://example.com", request, Integer.class); assertEquals("Invalid POST result", expected, result.getBody()); assertEquals("Invalid Content-Type", textPlain, result.getHeaders().getContentType()); assertEquals("Invalid Accept header", textPlain.toString(), requestHeaders.getFirst("Accept")); @@ -501,7 +501,7 @@ public class RestTemplateTests { MediaType textPlain = new MediaType("text", "plain"); given(converter.canRead(Integer.class, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -517,7 +517,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - Integer result = template.postForObject("http://example.com", null, Integer.class); + Integer result = template.postForObject("https://example.com", null, Integer.class); assertNull("Invalid POST result", result); assertEquals("Invalid content length", 0, requestHeaders.getContentLength()); @@ -529,7 +529,7 @@ public class RestTemplateTests { MediaType textPlain = new MediaType("text", "plain"); given(converter.canRead(Integer.class, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(textPlain)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -546,7 +546,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - ResponseEntity result = template.postForEntity("http://example.com", null, Integer.class); + ResponseEntity result = template.postForEntity("https://example.com", null, Integer.class); assertFalse("Invalid POST result", result.hasBody()); assertEquals("Invalid Content-Type", textPlain, result.getHeaders().getContentType()); assertEquals("Invalid content length", 0, requestHeaders.getContentLength()); @@ -558,7 +558,7 @@ public class RestTemplateTests { @Test public void put() throws Exception { given(converter.canWrite(String.class, null)).willReturn(true); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.PUT)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.PUT)).willReturn(request); String helloWorld = "Hello World"; converter.write(helloWorld, null, request); given(request.execute()).willReturn(response); @@ -567,14 +567,14 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.put("http://example.com", helloWorld); + template.put("https://example.com", helloWorld); verify(response).close(); } @Test public void putNull() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.PUT)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.PUT)).willReturn(request); HttpHeaders requestHeaders = new HttpHeaders(); given(request.getHeaders()).willReturn(requestHeaders); given(request.execute()).willReturn(response); @@ -583,7 +583,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.put("http://example.com", null); + template.put("https://example.com", null); assertEquals("Invalid content length", 0, requestHeaders.getContentLength()); verify(response).close(); @@ -591,21 +591,21 @@ public class RestTemplateTests { @Test public void delete() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.DELETE)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.DELETE)).willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpStatus status = HttpStatus.OK; given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - template.delete("http://example.com"); + template.delete("https://example.com"); verify(response).close(); } @Test public void optionsForAllow() throws Exception { - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.OPTIONS)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.OPTIONS)).willReturn(request); given(request.execute()).willReturn(response); given(errorHandler.hasError(response)).willReturn(false); HttpHeaders responseHeaders = new HttpHeaders(); @@ -616,7 +616,7 @@ public class RestTemplateTests { given(response.getStatusCode()).willReturn(status); given(response.getStatusText()).willReturn(status.getReasonPhrase()); - Set result = template.optionsForAllow("http://example.com"); + Set result = template.optionsForAllow("https://example.com"); assertEquals("Invalid OPTIONS result", expected, result); verify(response).close(); @@ -627,12 +627,12 @@ public class RestTemplateTests { given(converter.canRead(String.class, null)).willReturn(true); MediaType mediaType = new MediaType("foo", "bar"); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(mediaType)); - given(requestFactory.createRequest(new URI("http://example.com/resource"), HttpMethod.GET)).willReturn(request); + given(requestFactory.createRequest(new URI("https://example.com/resource"), HttpMethod.GET)).willReturn(request); given(request.getHeaders()).willReturn(new HttpHeaders()); given(request.execute()).willThrow(new IOException()); try { - template.getForObject("http://example.com/resource", String.class); + template.getForObject("https://example.com/resource", String.class); fail("RestClientException expected"); } catch (ResourceAccessException ex) { @@ -644,7 +644,7 @@ public class RestTemplateTests { public void exchange() throws Exception { given(converter.canRead(Integer.class, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(MediaType.TEXT_PLAIN)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(this.request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(this.request); HttpHeaders requestHeaders = new HttpHeaders(); given(this.request.getHeaders()).willReturn(requestHeaders); given(converter.canWrite(String.class, null)).willReturn(true); @@ -670,7 +670,7 @@ public class RestTemplateTests { HttpHeaders entityHeaders = new HttpHeaders(); entityHeaders.set("MyHeader", "MyValue"); HttpEntity requestEntity = new HttpEntity(body, entityHeaders); - ResponseEntity result = template.exchange("http://example.com", HttpMethod.POST, requestEntity, Integer.class); + ResponseEntity result = template.exchange("https://example.com", HttpMethod.POST, requestEntity, Integer.class); assertEquals("Invalid POST result", expected, result.getBody()); assertEquals("Invalid Content-Type", MediaType.TEXT_PLAIN, result.getHeaders().getContentType()); assertEquals("Invalid Accept header", MediaType.TEXT_PLAIN_VALUE, requestHeaders.getFirst("Accept")); @@ -689,7 +689,7 @@ public class RestTemplateTests { ParameterizedTypeReference> intList = new ParameterizedTypeReference>() {}; given(converter.canRead(intList.getType(), null, null)).willReturn(true); given(converter.getSupportedMediaTypes()).willReturn(Collections.singletonList(MediaType.TEXT_PLAIN)); - given(requestFactory.createRequest(new URI("http://example.com"), HttpMethod.POST)).willReturn(this.request); + given(requestFactory.createRequest(new URI("https://example.com"), HttpMethod.POST)).willReturn(this.request); HttpHeaders requestHeaders = new HttpHeaders(); given(this.request.getHeaders()).willReturn(requestHeaders); given(converter.canWrite(String.class, null)).willReturn(true); @@ -714,7 +714,7 @@ public class RestTemplateTests { HttpHeaders entityHeaders = new HttpHeaders(); entityHeaders.set("MyHeader", "MyValue"); HttpEntity requestEntity = new HttpEntity(requestBody, entityHeaders); - ResponseEntity> result = template.exchange("http://example.com", HttpMethod.POST, requestEntity, intList); + ResponseEntity> result = template.exchange("https://example.com", HttpMethod.POST, requestEntity, intList); assertEquals("Invalid POST result", expected, result.getBody()); assertEquals("Invalid Content-Type", MediaType.TEXT_PLAIN, result.getHeaders().getContentType()); assertEquals("Invalid Accept header", MediaType.TEXT_PLAIN_VALUE, requestHeaders.getFirst("Accept")); diff --git a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java index 9b52a0511c6..c54e08997c5 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java @@ -71,7 +71,7 @@ public class ServletWebRequestHttpMethodsTests { currentDate = new Date(); dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); - servletRequest = new MockHttpServletRequest(method, "http://example.org"); + servletRequest = new MockHttpServletRequest(method, "https://example.org"); servletResponse = new MockHttpServletResponse(); request = new ServletWebRequest(servletRequest, servletResponse); } diff --git a/spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java b/spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java index 412ad44269c..deacb50f85e 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/CorsConfigurationTests.java @@ -110,17 +110,17 @@ public class CorsConfigurationTests { config.addAllowedHeader("*"); config.addAllowedMethod("*"); CorsConfiguration other = new CorsConfiguration(); - other.addAllowedOrigin("http://domain.com"); + other.addAllowedOrigin("https://domain.com"); other.addAllowedHeader("header1"); other.addExposedHeader("header2"); other.addAllowedMethod(HttpMethod.PUT.name()); CorsConfiguration combinedConfig = config.combine(other); - assertEquals(Arrays.asList("http://domain.com"), combinedConfig.getAllowedOrigins()); + assertEquals(Arrays.asList("https://domain.com"), combinedConfig.getAllowedOrigins()); assertEquals(Arrays.asList("header1"), combinedConfig.getAllowedHeaders()); assertEquals(Arrays.asList("header2"), combinedConfig.getExposedHeaders()); assertEquals(Arrays.asList(HttpMethod.PUT.name()), combinedConfig.getAllowedMethods()); combinedConfig = other.combine(config); - assertEquals(Arrays.asList("http://domain.com"), combinedConfig.getAllowedOrigins()); + assertEquals(Arrays.asList("https://domain.com"), combinedConfig.getAllowedOrigins()); assertEquals(Arrays.asList("header1"), combinedConfig.getAllowedHeaders()); assertEquals(Arrays.asList("header2"), combinedConfig.getExposedHeaders()); assertEquals(Arrays.asList(HttpMethod.PUT.name()), combinedConfig.getAllowedMethods()); @@ -128,21 +128,21 @@ public class CorsConfigurationTests { @Test public void combine() { - config.addAllowedOrigin("http://domain1.com"); + config.addAllowedOrigin("https://domain1.com"); config.addAllowedHeader("header1"); config.addExposedHeader("header3"); config.addAllowedMethod(HttpMethod.GET.name()); config.setMaxAge(123L); config.setAllowCredentials(true); CorsConfiguration other = new CorsConfiguration(); - other.addAllowedOrigin("http://domain2.com"); + other.addAllowedOrigin("https://domain2.com"); other.addAllowedHeader("header2"); other.addExposedHeader("header4"); other.addAllowedMethod(HttpMethod.PUT.name()); other.setMaxAge(456L); other.setAllowCredentials(false); config = config.combine(other); - assertEquals(Arrays.asList("http://domain1.com", "http://domain2.com"), config.getAllowedOrigins()); + assertEquals(Arrays.asList("https://domain1.com", "https://domain2.com"), config.getAllowedOrigins()); assertEquals(Arrays.asList("header1", "header2"), config.getAllowedHeaders()); assertEquals(Arrays.asList("header3", "header4"), config.getExposedHeaders()); assertEquals(Arrays.asList(HttpMethod.GET.name(), HttpMethod.PUT.name()), config.getAllowedMethods()); @@ -153,25 +153,25 @@ public class CorsConfigurationTests { @Test public void checkOriginAllowed() { config.setAllowedOrigins(Arrays.asList("*")); - assertEquals("*", config.checkOrigin("http://domain.com")); + assertEquals("*", config.checkOrigin("https://domain.com")); config.setAllowCredentials(true); - assertEquals("http://domain.com", config.checkOrigin("http://domain.com")); - config.setAllowedOrigins(Arrays.asList("http://domain.com")); - assertEquals("http://domain.com", config.checkOrigin("http://domain.com")); + assertEquals("https://domain.com", config.checkOrigin("https://domain.com")); + config.setAllowedOrigins(Arrays.asList("https://domain.com")); + assertEquals("https://domain.com", config.checkOrigin("https://domain.com")); config.setAllowCredentials(false); - assertEquals("http://domain.com", config.checkOrigin("http://domain.com")); + assertEquals("https://domain.com", config.checkOrigin("https://domain.com")); } @Test public void checkOriginNotAllowed() { assertNull(config.checkOrigin(null)); - assertNull(config.checkOrigin("http://domain.com")); + assertNull(config.checkOrigin("https://domain.com")); config.addAllowedOrigin("*"); assertNull(config.checkOrigin(null)); - config.setAllowedOrigins(Arrays.asList("http://domain1.com")); - assertNull(config.checkOrigin("http://domain2.com")); + config.setAllowedOrigins(Arrays.asList("https://domain1.com")); + assertNull(config.checkOrigin("https://domain2.com")); config.setAllowedOrigins(new ArrayList<>()); - assertNull(config.checkOrigin("http://domain.com")); + assertNull(config.checkOrigin("https://domain.com")); } @Test diff --git a/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java b/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java index 9ca1c2368c2..0a923d67ff5 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java @@ -34,7 +34,7 @@ public class CorsUtilsTests { @Test public void isCorsRequest() { MockHttpServletRequest request = new MockHttpServletRequest(); - request.addHeader(HttpHeaders.ORIGIN, "http://domain.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain.com"); assertTrue(CorsUtils.isCorsRequest(request)); } @@ -48,7 +48,7 @@ public class CorsUtilsTests { public void isPreFlightRequest() { MockHttpServletRequest request = new MockHttpServletRequest(); request.setMethod(HttpMethod.OPTIONS.name()); - request.addHeader(HttpHeaders.ORIGIN, "http://domain.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain.com"); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); assertTrue(CorsUtils.isPreFlightRequest(request)); } @@ -60,7 +60,7 @@ public class CorsUtilsTests { request = new MockHttpServletRequest(); request.setMethod(HttpMethod.OPTIONS.name()); - request.addHeader(HttpHeaders.ORIGIN, "http://domain.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain.com"); assertFalse(CorsUtils.isPreFlightRequest(request)); request = new MockHttpServletRequest(); diff --git a/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java b/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java index 986b9c49fd4..fa3b4090f31 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java @@ -61,7 +61,7 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestWithOriginHeader() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertFalse(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -71,7 +71,7 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestWithOriginHeaderAndNullConfig() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.processor.processRequest(null, this.request, this.response); assertFalse(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -81,7 +81,7 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestWithOriginHeaderAndAllowedOrigin() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.conf.addAllowedOrigin("*"); this.processor.processRequest(this.conf, this.request, this.response); @@ -95,15 +95,15 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestCredentials() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); - this.conf.addAllowedOrigin("http://domain1.com"); - this.conf.addAllowedOrigin("http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); + this.conf.addAllowedOrigin("https://domain1.com"); + this.conf.addAllowedOrigin("https://domain2.com"); this.conf.addAllowedOrigin("http://domain3.com"); this.conf.setAllowCredentials(true); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - assertEquals("http://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals("true", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals(HttpServletResponse.SC_OK, this.response.getStatus()); @@ -112,13 +112,13 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestCredentialsWithOriginWildcard() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.conf.addAllowedOrigin("*"); this.conf.setAllowCredentials(true); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - assertEquals("http://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals("true", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals(HttpServletResponse.SC_OK, this.response.getStatus()); @@ -127,8 +127,8 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestCaseInsensitiveOriginMatch() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); - this.conf.addAllowedOrigin("http://DOMAIN2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); + this.conf.addAllowedOrigin("https://DOMAIN2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -138,14 +138,14 @@ public class DefaultCorsProcessorTests { @Test public void actualRequestExposedHeaders() throws Exception { this.request.setMethod(HttpMethod.GET.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.conf.addExposedHeader("header1"); this.conf.addExposedHeader("header2"); - this.conf.addAllowedOrigin("http://domain2.com"); + this.conf.addAllowedOrigin("https://domain2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - assertEquals("http://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS)); assertTrue(this.response.getHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS).contains("header1")); assertTrue(this.response.getHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS).contains("header2")); @@ -155,7 +155,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestAllOriginsAllowed() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.conf.addAllowedOrigin("*"); @@ -166,7 +166,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestWrongAllowedMethod() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "DELETE"); this.conf.addAllowedOrigin("*"); @@ -177,7 +177,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestMatchedAllowedMethod() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.conf.addAllowedOrigin("*"); @@ -189,7 +189,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestTestWithOriginButWithoutOtherHeaders() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertFalse(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -199,7 +199,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestWithoutRequestMethod() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1"); this.processor.processRequest(this.conf, this.request, this.response); @@ -210,7 +210,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestWithRequestAndMethodHeaderButNoConfig() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1"); @@ -222,7 +222,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestValidRequestAndConfig() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1"); this.conf.addAllowedOrigin("*"); @@ -243,18 +243,18 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestCredentials() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1"); - this.conf.addAllowedOrigin("http://domain1.com"); - this.conf.addAllowedOrigin("http://domain2.com"); + this.conf.addAllowedOrigin("https://domain1.com"); + this.conf.addAllowedOrigin("https://domain2.com"); this.conf.addAllowedOrigin("http://domain3.com"); this.conf.addAllowedHeader("Header1"); this.conf.setAllowCredentials(true); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - assertEquals("http://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals("true", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); assertEquals(HttpServletResponse.SC_OK, this.response.getStatus()); @@ -263,10 +263,10 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestCredentialsWithOriginWildcard() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1"); - this.conf.addAllowedOrigin("http://domain1.com"); + this.conf.addAllowedOrigin("https://domain1.com"); this.conf.addAllowedOrigin("*"); this.conf.addAllowedOrigin("http://domain3.com"); this.conf.addAllowedHeader("Header1"); @@ -274,20 +274,20 @@ public class DefaultCorsProcessorTests { this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - assertEquals("http://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", this.response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertEquals(HttpServletResponse.SC_OK, this.response.getStatus()); } @Test public void preflightRequestAllowedHeaders() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1, Header2"); this.conf.addAllowedHeader("Header1"); this.conf.addAllowedHeader("Header2"); this.conf.addAllowedHeader("Header3"); - this.conf.addAllowedOrigin("http://domain2.com"); + this.conf.addAllowedOrigin("https://domain2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -301,11 +301,11 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestAllowsAllHeaders() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "Header1, Header2"); this.conf.addAllowedHeader("*"); - this.conf.addAllowedOrigin("http://domain2.com"); + this.conf.addAllowedOrigin("https://domain2.com"); this.processor.processRequest(this.conf, this.request, this.response); assertTrue(this.response.containsHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); @@ -319,7 +319,7 @@ public class DefaultCorsProcessorTests { @Test public void preflightRequestWithNullConfig() throws Exception { this.request.setMethod(HttpMethod.OPTIONS.name()); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); this.conf.addAllowedOrigin("*"); diff --git a/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java index 92bca321382..77458b5ada5 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java @@ -43,7 +43,7 @@ public class CorsFilterTests { @Before public void setup() throws Exception { - config.setAllowedOrigins(Arrays.asList("http://domain1.com", "http://domain2.com")); + config.setAllowedOrigins(Arrays.asList("https://domain1.com", "https://domain2.com")); config.setAllowedMethods(Arrays.asList("GET", "POST")); config.setAllowedHeaders(Arrays.asList("header1", "header2")); config.setExposedHeaders(Arrays.asList("header3", "header4")); @@ -56,12 +56,12 @@ public class CorsFilterTests { public void validActualRequest() throws ServletException, IOException { MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.GET.name(), "/test.html"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); request.addHeader("header2", "foo"); MockHttpServletResponse response = new MockHttpServletResponse(); FilterChain filterChain = (filterRequest, filterResponse) -> { - assertEquals("http://domain2.com", response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertEquals("header3, header4", response.getHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS)); }; filter.doFilter(request, response, filterChain); @@ -71,7 +71,7 @@ public class CorsFilterTests { public void invalidActualRequest() throws ServletException, IOException { MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.DELETE.name(), "/test.html"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); request.addHeader("header2", "foo"); MockHttpServletResponse response = new MockHttpServletResponse(); @@ -86,7 +86,7 @@ public class CorsFilterTests { public void validPreFlightRequest() throws ServletException, IOException { MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.OPTIONS.name(), "/test.html"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, HttpMethod.GET.name()); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "header1, header2"); MockHttpServletResponse response = new MockHttpServletResponse(); @@ -95,7 +95,7 @@ public class CorsFilterTests { fail("Preflight requests must not be forwarded to the filter chain"); filter.doFilter(request, response, filterChain); - assertEquals("http://domain2.com", response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); + assertEquals("https://domain2.com", response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertEquals("header1, header2", response.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS)); assertEquals("header3, header4", response.getHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS)); assertEquals(123L, Long.parseLong(response.getHeader(HttpHeaders.ACCESS_CONTROL_MAX_AGE))); @@ -105,7 +105,7 @@ public class CorsFilterTests { public void invalidPreFlightRequest() throws ServletException, IOException { MockHttpServletRequest request = new MockHttpServletRequest(HttpMethod.OPTIONS.name(), "/test.html"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, HttpMethod.DELETE.name()); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "header1, header2"); MockHttpServletResponse response = new MockHttpServletResponse(); diff --git a/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java index 51e3c03e65d..aa4c4e98a49 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java @@ -186,7 +186,7 @@ public class ShallowEtagHeaderFilterTests { assertEquals("Invalid request passed", request, filterRequest); response.setContentLength(100); FileCopyUtils.copy(responseBody, filterResponse.getOutputStream()); - ((HttpServletResponse) filterResponse).sendRedirect("http://www.google.com"); + ((HttpServletResponse) filterResponse).sendRedirect("https://www.google.com"); }; filter.doFilter(request, response, filterChain); @@ -194,7 +194,7 @@ public class ShallowEtagHeaderFilterTests { assertNull("Invalid ETag header", response.getHeader("ETag")); assertEquals("Invalid Content-Length header", 100, response.getContentLength()); assertArrayEquals("Invalid content", responseBody, response.getContentAsByteArray()); - assertEquals("Invalid redirect URL", "http://www.google.com", response.getRedirectedUrl()); + assertEquals("Invalid redirect URL", "https://www.google.com", response.getRedirectedUrl()); } // SPR-13717 diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java index c82cfbdf36f..bfbfe588053 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java @@ -56,7 +56,7 @@ public class RequestPartServletServerHttpRequestTests { this.mockRequest.addFile(new MockMultipartFile("part", "", "application/json", "content".getBytes("UTF-8"))); ServerHttpRequest request = new RequestPartServletServerHttpRequest(this.mockRequest, "part"); - URI uri = new URI("http://example.com/path?query"); + URI uri = new URI("https://example.com/path?query"); this.mockRequest.setServerName(uri.getHost()); this.mockRequest.setServerPort(uri.getPort()); this.mockRequest.setRequestURI(uri.getPath()); diff --git a/spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java b/spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java index 45663f04dc1..86c387646e1 100644 --- a/spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/DefaultUriTemplateHandlerTests.java @@ -62,11 +62,11 @@ public class DefaultUriTemplateHandlerTests { Map vars = new HashMap(2); vars.put("hotel", "1"); vars.put("publicpath", "pics/logo.png"); - String template = "http://example.com/hotels/{hotel}/pic/{publicpath}"; + String template = "https://example.com/hotels/{hotel}/pic/{publicpath}"; URI actual = this.handler.expand(template, vars); - URI expected = new URI("http://example.com/hotels/1/pic/pics/logo.png"); + URI expected = new URI("https://example.com/hotels/1/pic/pics/logo.png"); assertEquals(expected, actual); } @@ -76,12 +76,12 @@ public class DefaultUriTemplateHandlerTests { vars.put("hotel", "1"); vars.put("publicpath", "pics/logo.png"); vars.put("scale", "150x150"); - String template = "http://example.com/hotels/{hotel}/pic/{publicpath}/size/{scale}"; + String template = "https://example.com/hotels/{hotel}/pic/{publicpath}/size/{scale}"; this.handler.setParsePath(true); URI actual = this.handler.expand(template, vars); - URI expected = new URI("http://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150"); + URI expected = new URI("https://example.com/hotels/1/pic/pics%2Flogo.png/size/150x150"); assertEquals(expected, actual); } diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java index 1444ee2fa53..b6cbf4545fc 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java @@ -56,7 +56,7 @@ public class UriComponentsBuilderTests { assertEquals("bar", result.getQuery()); assertEquals("baz", result.getFragment()); - URI expected = new URI("http://example.com/foo?bar#baz"); + URI expected = new URI("https://example.com/foo?bar#baz"); assertEquals("Invalid result URI", expected, result.toUri()); } @@ -70,7 +70,7 @@ public class UriComponentsBuilderTests { assertEquals("http", result1.getScheme()); assertEquals("example.com", result1.getHost()); assertEquals("/foo", result1.getPath()); - URI expected = new URI("http://example.com/foo"); + URI expected = new URI("https://example.com/foo"); assertEquals("Invalid result URI", expected, result1.toUri()); assertEquals("http", result2.getScheme()); @@ -78,7 +78,7 @@ public class UriComponentsBuilderTests { assertEquals("/foo/foo2", result2.getPath()); assertEquals("bar", result2.getQuery()); assertEquals("baz", result2.getFragment()); - expected = new URI("http://example.com/foo/foo2?bar#baz"); + expected = new URI("https://example.com/foo/foo2?bar#baz"); assertEquals("Invalid result URI", expected, result2.toUri()); } @@ -103,7 +103,7 @@ public class UriComponentsBuilderTests { @Test public void fromHierarchicalUri() throws URISyntaxException { - URI uri = new URI("http://example.com/foo?bar#baz"); + URI uri = new URI("https://example.com/foo?bar#baz"); UriComponents result = UriComponentsBuilder.fromUri(uri).build(); assertEquals("http", result.getScheme()); assertEquals("example.com", result.getHost()); @@ -127,7 +127,7 @@ public class UriComponentsBuilderTests { @Test // SPR-9317 public void fromUriEncodedQuery() throws URISyntaxException { - URI uri = new URI("http://www.example.org/?param=aGVsbG9Xb3JsZA%3D%3D"); + URI uri = new URI("https://www.example.org/?param=aGVsbG9Xb3JsZA%3D%3D"); String fromUri = UriComponentsBuilder.fromUri(uri).build().getQueryParams().get("param").get(0); String fromUriString = UriComponentsBuilder.fromUriString(uri.toString()).build().getQueryParams().get("param").get(0); @@ -136,7 +136,7 @@ public class UriComponentsBuilderTests { @Test public void fromUriString() { - UriComponents result = UriComponentsBuilder.fromUriString("http://www.ietf.org/rfc/rfc3986.txt").build(); + UriComponents result = UriComponentsBuilder.fromUriString("https://www.ietf.org/rfc/rfc3986.txt").build(); assertEquals("http", result.getScheme()); assertNull(result.getUserInfo()); assertEquals("www.ietf.org", result.getHost()); @@ -147,7 +147,7 @@ public class UriComponentsBuilderTests { assertNull(result.getFragment()); result = UriComponentsBuilder.fromUriString( - "http://arjen:foobar@java.sun.com:80/javase/6/docs/api/java/util/BitSet.html?foo=bar#and(java.util.BitSet)") + "https://arjen:foobar@java.sun.com:80/javase/6/docs/api/java/util/BitSet.html?foo=bar#and(java.util.BitSet)") .build(); assertEquals("http", result.getScheme()); assertEquals("arjen:foobar", result.getUserInfo()); @@ -182,7 +182,7 @@ public class UriComponentsBuilderTests { @Test // SPR-9832 public void fromUriStringQueryParamWithReservedCharInValue() throws URISyntaxException { - String uri = "http://www.google.com/ig/calculator?q=1USD=?EUR"; + String uri = "https://www.google.com/ig/calculator?q=1USD=?EUR"; UriComponents result = UriComponentsBuilder.fromUriString(uri).build(); assertEquals("q=1USD=?EUR", result.getQuery()); @@ -219,7 +219,7 @@ public class UriComponentsBuilderTests { @Test // SPR-11970 public void fromUriStringNoPathWithReservedCharInQuery() { - UriComponents result = UriComponentsBuilder.fromUriString("http://example.com?foo=bar@baz").build(); + UriComponents result = UriComponentsBuilder.fromUriString("https://example.com?foo=bar@baz").build(); assertTrue(StringUtils.isEmpty(result.getUserInfo())); assertEquals("example.com", result.getHost()); assertTrue(result.getQueryParams().containsKey("foo")); @@ -449,7 +449,7 @@ public class UriComponentsBuilderTests { HttpRequest httpRequest = new ServletServerHttpRequest(request); UriComponents result = UriComponentsBuilder.fromHttpRequest(httpRequest).build(); - assertEquals("http://a.example.org/mvc-showcase", result.toString()); + assertEquals("https://a.example.org/mvc-showcase", result.toString()); } @Test // SPR-12816 @@ -547,32 +547,32 @@ public class UriComponentsBuilderTests { @Test public void replacePath() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://www.ietf.org/rfc/rfc2396.txt"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://www.ietf.org/rfc/rfc2396.txt"); builder.replacePath("/rfc/rfc3986.txt"); UriComponents result = builder.build(); - assertEquals("http://www.ietf.org/rfc/rfc3986.txt", result.toUriString()); + assertEquals("https://www.ietf.org/rfc/rfc3986.txt", result.toUriString()); - builder = UriComponentsBuilder.fromUriString("http://www.ietf.org/rfc/rfc2396.txt"); + builder = UriComponentsBuilder.fromUriString("https://www.ietf.org/rfc/rfc2396.txt"); builder.replacePath(null); result = builder.build(); - assertEquals("http://www.ietf.org", result.toUriString()); + assertEquals("https://www.ietf.org", result.toUriString()); } @Test public void replaceQuery() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.com/foo?foo=bar&baz=qux"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.com/foo?foo=bar&baz=qux"); builder.replaceQuery("baz=42"); UriComponents result = builder.build(); - assertEquals("http://example.com/foo?baz=42", result.toUriString()); + assertEquals("https://example.com/foo?baz=42", result.toUriString()); - builder = UriComponentsBuilder.fromUriString("http://example.com/foo?foo=bar&baz=qux"); + builder = UriComponentsBuilder.fromUriString("https://example.com/foo?foo=bar&baz=qux"); builder.replaceQuery(null); result = builder.build(); - assertEquals("http://example.com/foo", result.toUriString()); + assertEquals("https://example.com/foo", result.toUriString()); } @Test @@ -639,22 +639,22 @@ public class UriComponentsBuilderTests { @Test public void queryParamWithValueWithEquals() throws Exception { - UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar=baz").build(); - assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar=baz")); + UriComponents uriComponents = UriComponentsBuilder.fromUriString("https://example.com/foo?bar=baz").build(); + assertThat(uriComponents.toUriString(), equalTo("https://example.com/foo?bar=baz")); assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo("baz")); } @Test public void queryParamWithoutValueWithEquals() throws Exception { - UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar=").build(); - assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar=")); + UriComponents uriComponents = UriComponentsBuilder.fromUriString("https://example.com/foo?bar=").build(); + assertThat(uriComponents.toUriString(), equalTo("https://example.com/foo?bar=")); assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo("")); } @Test public void queryParamWithoutValueWithoutEquals() throws Exception { - UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar").build(); - assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar")); + UriComponents uriComponents = UriComponentsBuilder.fromUriString("https://example.com/foo?bar").build(); + assertThat(uriComponents.toUriString(), equalTo("https://example.com/foo?bar")); // TODO [SPR-13537] Change equalTo(null) to equalTo(""). assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo(null)); @@ -662,23 +662,23 @@ public class UriComponentsBuilderTests { @Test public void relativeUrls() throws Exception { - assertThat(UriComponentsBuilder.fromUriString("http://example.com/foo/../bar").build().toString(), equalTo("http://example.com/foo/../bar")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com/foo/../bar").build().toUriString(), equalTo("http://example.com/foo/../bar")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com/foo/../bar").build().toUri().getPath(), equalTo("/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/foo/../bar").build().toString(), equalTo("https://example.com/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/foo/../bar").build().toUriString(), equalTo("https://example.com/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/foo/../bar").build().toUri().getPath(), equalTo("/foo/../bar")); assertThat(UriComponentsBuilder.fromUriString("../../").build().toString(), equalTo("../../")); assertThat(UriComponentsBuilder.fromUriString("../../").build().toUriString(), equalTo("../../")); assertThat(UriComponentsBuilder.fromUriString("../../").build().toUri().getPath(), equalTo("../../")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com").path("foo/../bar").build().toString(), equalTo("http://example.com/foo/../bar")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com").path("foo/../bar").build().toUriString(), equalTo("http://example.com/foo/../bar")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com").path("foo/../bar").build().toUri().getPath(), equalTo("/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com").path("foo/../bar").build().toString(), equalTo("https://example.com/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com").path("foo/../bar").build().toUriString(), equalTo("https://example.com/foo/../bar")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com").path("foo/../bar").build().toUri().getPath(), equalTo("/foo/../bar")); } @Test public void emptySegments() throws Exception { - assertThat(UriComponentsBuilder.fromUriString("http://example.com/abc/").path("/x/y/z").build().toString(), equalTo("http://example.com/abc/x/y/z")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com/abc/").pathSegment("x", "y", "z").build().toString(), equalTo("http://example.com/abc/x/y/z")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com/abc/").path("/x/").path("/y/z").build().toString(), equalTo("http://example.com/abc/x/y/z")); - assertThat(UriComponentsBuilder.fromUriString("http://example.com/abc/").pathSegment("x").path("y").build().toString(), equalTo("http://example.com/abc/x/y")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/abc/").path("/x/y/z").build().toString(), equalTo("https://example.com/abc/x/y/z")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/abc/").pathSegment("x", "y", "z").build().toString(), equalTo("https://example.com/abc/x/y/z")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/abc/").path("/x/").path("/y/z").build().toString(), equalTo("https://example.com/abc/x/y/z")); + assertThat(UriComponentsBuilder.fromUriString("https://example.com/abc/").pathSegment("x").path("y").build().toString(), equalTo("https://example.com/abc/x/y")); } @Test diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java index a08daa0dadd..5541e384def 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java @@ -50,23 +50,23 @@ public class UriComponentsTests { @Test public void toUriEncoded() throws URISyntaxException { UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com/hotel list/Z\u00fcrich").build(); - assertEquals(new URI("http://example.com/hotel%20list/Z%C3%BCrich"), uriComponents.encode().toUri()); + "https://example.com/hotel list/Z\u00fcrich").build(); + assertEquals(new URI("https://example.com/hotel%20list/Z%C3%BCrich"), uriComponents.encode().toUri()); } @Test public void toUriNotEncoded() throws URISyntaxException { UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com/hotel list/Z\u00fcrich").build(); - assertEquals(new URI("http://example.com/hotel%20list/Z\u00fcrich"), uriComponents.toUri()); + "https://example.com/hotel list/Z\u00fcrich").build(); + assertEquals(new URI("https://example.com/hotel%20list/Z\u00fcrich"), uriComponents.toUri()); } @Test public void toUriAlreadyEncoded() throws URISyntaxException { UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com/hotel%20list/Z%C3%BCrich").build(true); + "https://example.com/hotel%20list/Z%C3%BCrich").build(true); UriComponents encoded = uriComponents.encode(); - assertEquals(new URI("http://example.com/hotel%20list/Z%C3%BCrich"), encoded.toUri()); + assertEquals(new URI("https://example.com/hotel%20list/Z%C3%BCrich"), encoded.toUri()); } @Test @@ -80,10 +80,10 @@ public class UriComponentsTests { @Test public void expand() { UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com").path("/{foo} {bar}").build(); + "https://example.com").path("/{foo} {bar}").build(); uriComponents = uriComponents.expand("1 2", "3 4"); assertEquals("/1 2 3 4", uriComponents.getPath()); - assertEquals("http://example.com/1 2 3 4", uriComponents.toUriString()); + assertEquals("https://example.com/1 2 3 4", uriComponents.toUriString()); } // SPR-13311 @@ -100,18 +100,18 @@ public class UriComponentsTests { @Test public void port() { - UriComponents uri1 = fromUriString("http://example.com:8080/bar").build(); - UriComponents uri2 = fromUriString("http://example.com/bar").port(8080).build(); - UriComponents uri3 = fromUriString("http://example.com/bar").port("{port}").build().expand(8080); - UriComponents uri4 = fromUriString("http://example.com/bar").port("808{digit}").build().expand(0); + UriComponents uri1 = fromUriString("https://example.com:8080/bar").build(); + UriComponents uri2 = fromUriString("https://example.com/bar").port(8080).build(); + UriComponents uri3 = fromUriString("https://example.com/bar").port("{port}").build().expand(8080); + UriComponents uri4 = fromUriString("https://example.com/bar").port("808{digit}").build().expand(0); assertEquals(8080, uri1.getPort()); - assertEquals("http://example.com:8080/bar", uri1.toUriString()); + assertEquals("https://example.com:8080/bar", uri1.toUriString()); assertEquals(8080, uri2.getPort()); - assertEquals("http://example.com:8080/bar", uri2.toUriString()); + assertEquals("https://example.com:8080/bar", uri2.toUriString()); assertEquals(8080, uri3.getPort()); - assertEquals("http://example.com:8080/bar", uri3.toUriString()); + assertEquals("https://example.com:8080/bar", uri3.toUriString()); assertEquals(8080, uri4.getPort()); - assertEquals("http://example.com:8080/bar", uri4.toUriString()); + assertEquals("https://example.com:8080/bar", uri4.toUriString()); } @Test(expected = IllegalStateException.class) @@ -131,14 +131,14 @@ public class UriComponentsTests { @Test public void normalize() { - UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo/../bar").build(); - assertEquals("http://example.com/bar", uriComponents.normalize().toString()); + UriComponents uriComponents = UriComponentsBuilder.fromUriString("https://example.com/foo/../bar").build(); + assertEquals("https://example.com/bar", uriComponents.normalize().toString()); } @Test public void serializable() throws Exception { UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com").path("/{foo}").query("bar={baz}").build(); + "https://example.com").path("/{foo}").query("bar={baz}").build(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(uriComponents); @@ -159,9 +159,9 @@ public class UriComponentsTests { @Test public void equalsHierarchicalUriComponents() throws Exception { - UriComponents uriComponents1 = UriComponentsBuilder.fromUriString("http://example.com").path("/{foo}").query("bar={baz}").build(); - UriComponents uriComponents2 = UriComponentsBuilder.fromUriString("http://example.com").path("/{foo}").query("bar={baz}").build(); - UriComponents uriComponents3 = UriComponentsBuilder.fromUriString("http://example.com").path("/{foo}").query("bin={baz}").build(); + UriComponents uriComponents1 = UriComponentsBuilder.fromUriString("https://example.com").path("/{foo}").query("bar={baz}").build(); + UriComponents uriComponents2 = UriComponentsBuilder.fromUriString("https://example.com").path("/{foo}").query("bar={baz}").build(); + UriComponents uriComponents3 = UriComponentsBuilder.fromUriString("https://example.com").path("/{foo}").query("bin={baz}").build(); assertThat(uriComponents1, instanceOf(HierarchicalUriComponents.class)); assertThat(uriComponents1, equalTo(uriComponents1)); assertThat(uriComponents1, equalTo(uriComponents2)); diff --git a/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java b/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java index 0aed4782726..798b8b9607d 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java @@ -35,21 +35,21 @@ public class UriTemplateTests { @Test public void getVariableNames() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); List variableNames = template.getVariableNames(); assertEquals("Invalid variable names", Arrays.asList("hotel", "booking"), variableNames); } @Test public void expandVarArgs() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); URI result = template.expand("1", "42"); - assertEquals("Invalid expanded template", new URI("http://example.com/hotels/1/bookings/42"), result); + assertEquals("Invalid expanded template", new URI("https://example.com/hotels/1/bookings/42"), result); } @Test(expected = IllegalArgumentException.class) public void expandVarArgsNotEnoughVariables() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); template.expand("1"); } @@ -58,9 +58,9 @@ public class UriTemplateTests { Map uriVariables = new HashMap(2); uriVariables.put("booking", "42"); uriVariables.put("hotel", "1"); - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); URI result = template.expand(uriVariables); - assertEquals("Invalid expanded template", new URI("http://example.com/hotels/1/bookings/42"), result); + assertEquals("Invalid expanded template", new URI("https://example.com/hotels/1/bookings/42"), result); } @Test @@ -76,17 +76,17 @@ public class UriTemplateTests { Map uriVariables = new HashMap(2); uriVariables.put("booking", 42); uriVariables.put("hotel", 1); - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); URI result = template.expand(uriVariables); - assertEquals("Invalid expanded template", new URI("http://example.com/hotels/1/bookings/42"), result); + assertEquals("Invalid expanded template", new URI("https://example.com/hotels/1/bookings/42"), result); } @Test public void expandMapEncoded() throws Exception { Map uriVariables = Collections.singletonMap("hotel", "Z\u00fcrich"); - UriTemplate template = new UriTemplate("http://example.com/hotel list/{hotel}"); + UriTemplate template = new UriTemplate("https://example.com/hotel list/{hotel}"); URI result = template.expand(uriVariables); - assertEquals("Invalid expanded template", new URI("http://example.com/hotel%20list/Z%C3%BCrich"), result); + assertEquals("Invalid expanded template", new URI("https://example.com/hotel%20list/Z%C3%BCrich"), result); } @Test(expected = IllegalArgumentException.class) @@ -94,31 +94,31 @@ public class UriTemplateTests { Map uriVariables = new HashMap(2); uriVariables.put("booking", "42"); uriVariables.put("bar", "1"); - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); template.expand(uriVariables); } @Test public void expandEncoded() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotel list/{hotel}"); + UriTemplate template = new UriTemplate("https://example.com/hotel list/{hotel}"); URI result = template.expand("Z\u00fcrich"); - assertEquals("Invalid expanded template", new URI("http://example.com/hotel%20list/Z%C3%BCrich"), result); + assertEquals("Invalid expanded template", new URI("https://example.com/hotel%20list/Z%C3%BCrich"), result); } @Test public void matches() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); - assertTrue("UriTemplate does not match", template.matches("http://example.com/hotels/1/bookings/42")); - assertFalse("UriTemplate matches", template.matches("http://example.com/hotels/bookings")); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); + assertTrue("UriTemplate does not match", template.matches("https://example.com/hotels/1/bookings/42")); + assertFalse("UriTemplate matches", template.matches("https://example.com/hotels/bookings")); assertFalse("UriTemplate matches", template.matches("")); assertFalse("UriTemplate matches", template.matches(null)); } @Test public void matchesCustomRegex() throws Exception { - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel:\\d+}"); - assertTrue("UriTemplate does not match", template.matches("http://example.com/hotels/42")); - assertFalse("UriTemplate matches", template.matches("http://example.com/hotels/foo")); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel:\\d+}"); + assertTrue("UriTemplate does not match", template.matches("https://example.com/hotels/42")); + assertFalse("UriTemplate matches", template.matches("https://example.com/hotels/foo")); } @Test @@ -127,8 +127,8 @@ public class UriTemplateTests { expected.put("booking", "42"); expected.put("hotel", "1"); - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); - Map result = template.match("http://example.com/hotels/1/bookings/42"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel}/bookings/{booking}"); + Map result = template.match("https://example.com/hotels/1/bookings/42"); assertEquals("Invalid match", expected, result); } @@ -138,8 +138,8 @@ public class UriTemplateTests { expected.put("booking", "42"); expected.put("hotel", "1"); - UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel:\\d}/bookings/{booking:\\d+}"); - Map result = template.match("http://example.com/hotels/1/bookings/42"); + UriTemplate template = new UriTemplate("https://example.com/hotels/{hotel:\\d}/bookings/{booking:\\d+}"); + Map result = template.match("https://example.com/hotels/1/bookings/42"); assertEquals("Invalid match", expected, result); } diff --git a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java index 129c287ed51..b27ef6d8475 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java @@ -169,7 +169,7 @@ public class UrlPathHelperTests { // // suite of tests root requests for default servlets (SRV 11.2) on Websphere vs Tomcat and other containers - // see: http://jira.springframework.org/browse/SPR-7064 + // see: https://jira.springframework.org/browse/SPR-7064 // diff --git a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java index 64065a59f38..4c53c44bf04 100644 --- a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java @@ -116,24 +116,24 @@ public class WebUtilsTests { @Test public void isValidOrigin() { List allowed = Collections.emptyList(); - assertTrue(checkValidOrigin("mydomain1.com", -1, "http://mydomain1.com", allowed)); + assertTrue(checkValidOrigin("mydomain1.com", -1, "https://mydomain1.com", allowed)); assertFalse(checkValidOrigin("mydomain1.com", -1, "http://mydomain2.com", allowed)); allowed = Collections.singletonList("*"); assertTrue(checkValidOrigin("mydomain1.com", -1, "http://mydomain2.com", allowed)); - allowed = Collections.singletonList("http://mydomain1.com"); - assertTrue(checkValidOrigin("mydomain2.com", -1, "http://mydomain1.com", allowed)); + allowed = Collections.singletonList("https://mydomain1.com"); + assertTrue(checkValidOrigin("mydomain2.com", -1, "https://mydomain1.com", allowed)); assertFalse(checkValidOrigin("mydomain2.com", -1, "http://mydomain3.com", allowed)); } @Test public void isSameOrigin() { - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com")); - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com:80")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://mydomain1.com")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://www.mydomain1.com/")); assertTrue(checkSameOrigin("mydomain1.com", 443, "https://mydomain1.com")); assertTrue(checkSameOrigin("mydomain1.com", 443, "https://mydomain1.com:443")); - assertTrue(checkSameOrigin("mydomain1.com", 123, "http://mydomain1.com:123")); + assertTrue(checkSameOrigin("mydomain1.com", 123, "https://mydomain1.com:123")); assertTrue(checkSameOrigin("mydomain1.com", -1, "ws://mydomain1.com")); assertTrue(checkSameOrigin("mydomain1.com", 443, "wss://mydomain1.com")); @@ -142,14 +142,14 @@ public class WebUtilsTests { assertFalse(checkSameOrigin("mydomain1.com", -1, "invalid-origin")); // Handling of invalid origins as described in SPR-13478 - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com/")); - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com:80/")); - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com/path")); - assertTrue(checkSameOrigin("mydomain1.com", -1, "http://mydomain1.com:80/path")); - assertFalse(checkSameOrigin("mydomain2.com", -1, "http://mydomain1.com/")); - assertFalse(checkSameOrigin("mydomain2.com", -1, "http://mydomain1.com:80/")); - assertFalse(checkSameOrigin("mydomain2.com", -1, "http://mydomain1.com/path")); - assertFalse(checkSameOrigin("mydomain2.com", -1, "http://mydomain1.com:80/path")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://mydomain1.com/")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://www.mydomain1.com/")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://mydomain1.com/path")); + assertTrue(checkSameOrigin("mydomain1.com", -1, "https://www.mydomain1.com/path")); + assertFalse(checkSameOrigin("mydomain2.com", -1, "https://mydomain1.com/")); + assertFalse(checkSameOrigin("mydomain2.com", -1, "https://www.mydomain1.com/")); + assertFalse(checkSameOrigin("mydomain2.com", -1, "https://mydomain1.com/path")); + assertFalse(checkSameOrigin("mydomain2.com", -1, "https://www.mydomain1.com/path")); // Handling of IPv6 hosts as described in SPR-13525 assertTrue(checkSameOrigin("[::1]", -1, "http://[::1]")); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java index 59ec4748287..ca5b9ad33be 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/CommonsPortletMultipartResolver.java @@ -36,7 +36,7 @@ import org.springframework.web.portlet.util.PortletUtils; /** * {@link PortletMultipartResolver} implementation for - * Apache Commons FileUpload + * Apache Commons FileUpload * 1.2 or above. * *

    Provides "maxUploadSize", "maxInMemorySize" and "defaultEncoding" settings as diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java index 9f6787d3664..3e3ae7f726d 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java @@ -22,7 +22,7 @@ import org.springframework.web.multipart.MultipartException; /** * Portlet version of Spring's multipart resolution strategy for file uploads - * as defined in RFC 1867. + * as defined in RFC 1867. * *

    Implementations are typically usable both within any application context * and standalone. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/package-info.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/package-info.java index 1b260618f15..44aa19f29fb 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/package-info.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/package-info.java @@ -4,7 +4,7 @@ * Useful for testing web contexts and controllers. * *

    More convenient to use than dynamic mock objects - * (EasyMock) or + * (EasyMock) or * existing Portlet API mock objects. */ diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java index 86a5485cf70..b405d1c605d 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesConfigurer.java @@ -66,7 +66,7 @@ import org.springframework.web.context.ServletContextAware; /** * Helper class to configure Tiles 2.x for the Spring Framework. See - * http://tiles.apache.org + * https://tiles.apache.org * for more information about Tiles, which basically is a templating mechanism * for web applications using JSPs and other template engines. * diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java index 6911a970122..bdc06812e2c 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the integration of - * Tiles2 + * Tiles2 * (the standalone version of Tiles) as Spring web view technology. * Contains a View implementation for Tiles definitions. */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java index 6031dcf77aa..462be5ccf5d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java @@ -27,7 +27,7 @@ import org.springframework.http.MediaType; * content, and exposing the model. A single view exposes multiple model attributes. * *

    This class and the MVC approach associated with it is discussed in Chapter 12 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). * *

    View implementations may differ widely. An obvious implementation would be diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/SseEmitter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/SseEmitter.java index a2026ea8f4d..0b64b9062bd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/SseEmitter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/SseEmitter.java @@ -28,7 +28,7 @@ import org.springframework.http.server.ServerHttpResponse; /** * A specialization of {@link ResponseBodyEmitter} for sending - * Server-Sent Events. + * Server-Sent Events. * * @author Rossen Stoyanchev * @author Juergen Hoeller diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java index 19b495821b2..829f867ef81 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java @@ -4,7 +4,7 @@ * Spring web MVC framework. * *

    This package and related packages are discussed in Chapters 12 and 13 of - * Expert One-On-One J2EE Design and Development + * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). */ package org.springframework.web.servlet; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java index ae8e4d61d8b..d51b471a72b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java @@ -54,7 +54,7 @@ import org.springframework.util.StringUtils; * * @author Brian Clozel * @since 4.1 - * @see HTML5 offline applications spec + * @see HTML5 offline applications spec */ public class AppCacheManifestTransformer extends ResourceTransformerSupport { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java index 139e47f2a05..f75bf69d72f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java @@ -27,7 +27,7 @@ import org.springframework.core.io.Resource; * * @author Jeremy Grelle * @since 4.1 - * @see HTTP/1.1: Semantics + * @see HTTP/1.1: Semantics * and Content, section 3.1.2.2 */ public interface EncodedResource extends Resource { @@ -35,7 +35,7 @@ public interface EncodedResource extends Resource { /** * The content coding value, as defined in the IANA registry * @return the content encoding - * @see HTTP/1.1: Semantics + * @see HTTP/1.1: Semantics * and Content, section 3.1.2.1 */ String getContentEncoding(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java index 415b96d9dfa..4afcef50f18 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/WebJarsResourceResolver.java @@ -41,7 +41,7 @@ import org.springframework.core.io.Resource; * @author Brian Clozel * @since 4.2 * @see org.springframework.web.servlet.config.annotation.ResourceChainRegistration - * @see webjars.org + * @see webjars.org */ public class WebJarsResourceResolver extends AbstractResourceResolver { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java index 6685d4264d2..0b29f55b761 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/ServletUriComponentsBuilder.java @@ -198,12 +198,12 @@ public class ServletUriComponentsBuilder extends UriComponentsBuilder { * requestURI}. This method must be invoked before any calls to {@link #path(String)} * or {@link #pathSegment(String...)}. *

    -	 * GET http://foo.com/rest/books/6.json
    +	 * GET http://www.foo.com/rest/books/6.json
     	 *
     	 * ServletUriComponentsBuilder builder = ServletUriComponentsBuilder.fromRequestUri(this.request);
     	 * String ext = builder.removePathExtension();
     	 * String uri = builder.path("/pages/1.{ext}").buildAndExpand(ext).toUriString();
    -	 * assertEquals("http://foo.com/rest/books/6/pages/1.json", result);
    +	 * assertEquals("http://www.foo.com/rest/books/6/pages/1.json", result);
     	 * 
    * @return the removed path extension for possible re-use, or {@code null} * @since 4.0 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java index 13dfcd79a31..ae1e8f015d4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/WebContentGenerator.java @@ -491,7 +491,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport { /** * Prevent the response from being cached. * Only called in HTTP 1.0 compatibility mode. - *

    See {@code http://www.mnot.net/cache_docs}. + *

    See {@code https://www.mnot.net/cache_docs}. * @deprecated as of 4.2, in favor of {@link #applyCacheControl} */ @Deprecated diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java index 67e971aae6e..24f850a756f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractExcelView.java @@ -50,7 +50,7 @@ import org.springframework.web.servlet.view.AbstractView; * * *

    For working with the workbook in the subclass, see - * Apache's POI site + * Apache's POI site * *

    As an example, you can try this snippet: * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java index e26ba89aef9..c12cf89bb72 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java @@ -31,7 +31,7 @@ import org.springframework.web.servlet.view.AbstractView; /** * Abstract superclass for PDF views, using Bruno Lowagie's - * iText package. + * iText package. * Application-specific view classes will extend this class. * The view will be held in the subclass itself, not in a template. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsView.java index f474f90aedd..5d010157a32 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsView.java @@ -33,7 +33,7 @@ import org.springframework.web.servlet.view.AbstractView; * Compatible with Apache POI 3.5 and higher. * *

    For working with the workbook in the subclass, see - * Apache's POI site + * Apache's POI site * * @author Juergen Hoeller * @since 4.2 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxStreamingView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxStreamingView.java index a23e25dded4..8715c2bdc3e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxStreamingView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxStreamingView.java @@ -29,7 +29,7 @@ import org.apache.poi.xssf.streaming.SXSSFWorkbook; * using POI's streaming variant. Compatible with Apache POI 3.9 and higher. * *

    For working with the workbook in subclasses, see - * Apache's POI site. + * Apache's POI site. * * @author Juergen Hoeller * @since 4.2 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxView.java index e6ef5886142..f0087de5384 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractXlsxView.java @@ -27,7 +27,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; * (as supported by POI-OOXML). Compatible with Apache POI 3.5 and higher. * *

    For working with the workbook in subclasses, see - * Apache's POI site. + * Apache's POI site. * * @author Juergen Hoeller * @since 4.2 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/AbstractAtomFeedView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/AbstractAtomFeedView.java index 4f80f3ca05b..735073e5d32 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/AbstractAtomFeedView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/AbstractAtomFeedView.java @@ -42,7 +42,7 @@ import com.rometools.rome.feed.atom.Feed; * @since 3.0 * @see #buildFeedMetadata * @see #buildFeedEntries - * @see Atom Syndication Format + * @see Atom Syndication Format */ public abstract class AbstractAtomFeedView extends AbstractFeedView { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java index 415eef0b202..8810df3a2d7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the integration of - * FreeMarker + * FreeMarker * as Spring web view technology. * Contains a View implementation for FreeMarker templates. */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java index 37c99003832..8a8d30abbcd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java @@ -41,7 +41,7 @@ import org.springframework.web.servlet.View; /** * Spring MVC {@link View} that renders JSON content by serializing the model for the current request - * using Jackson 2's {@link ObjectMapper}. + * using Jackson 2's {@link ObjectMapper}. * *

    By default, the entire contents of the model map (with the exception of framework-specific classes) * will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON @@ -167,7 +167,7 @@ public class MappingJackson2JsonView extends AbstractJackson2View { * specified by the JSONP request parameter value. *

    The parameter names configured by default are "jsonp" and "callback". * @since 4.1 - * @see JSONP Wikipedia article + * @see JSONP Wikipedia article */ public void setJsonpParameterNames(Set jsonpParameterNames) { this.jsonpParameterNames = jsonpParameterNames; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java index e07eb4e384a..2e43c03c4ba 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateConfigurer.java @@ -110,7 +110,7 @@ public class ScriptTemplateConfigurer implements ScriptTemplateConfig { * {@link #setEngineName(String)}. Using {@link #setEngine(ScriptEngine)} is not * possible because multiple instances of the script engine need to be created lazily * (one per thread). - * @see THREADING ScriptEngine parameter + * @see THREADING ScriptEngine parameter */ public void setSharedEngine(Boolean sharedEngine) { this.sharedEngine = sharedEngine; @@ -130,7 +130,7 @@ public class ScriptTemplateConfigurer implements ScriptTemplateConfig { * {@code configurer.setScripts("/META-INF/resources/webjars/library/version/library.js", * "com/myproject/script/render.js");}. * @see #setResourceLoaderPath - * @see WebJars + * @see WebJars */ public void setScripts(String... scriptNames) { this.scripts = scriptNames; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java index e883a13b896..c34b7f6ac50 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesConfigurer.java @@ -68,7 +68,7 @@ import org.springframework.web.context.ServletContextAware; /** * Helper class to configure Tiles 3.x for the Spring Framework. See - * http://tiles.apache.org + * https://tiles.apache.org * for more information about Tiles, which basically is a templating mechanism * for web applications using JSPs and other template engines. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java index 845ac01667d..ebc19ff1799 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the integration of - * Tiles3 + * Tiles3 * (the standalone version of Tiles) as Spring web view technology. * Contains a View implementation for Tiles definitions. */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java index e6fbf81b51c..52a5faf5d2d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java @@ -1,6 +1,6 @@ /** * Support classes for the integration of - * Velocity + * Velocity * as Spring web view technology. * Contains a View implementation for Velocity templates. */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java index 2d8e0f183f2..8b1b44daf31 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlView.java @@ -28,7 +28,7 @@ import org.springframework.web.servlet.view.json.AbstractJackson2View; /** * Spring MVC {@link View} that renders XML content by serializing the model for the current request - * using Jackson 2's {@link XmlMapper}. + * using Jackson 2's {@link XmlMapper}. * *

    The Object to be serialized is supplied as a parameter in the model. The first serializable * entry is used. Users can either specify a specific entry in the model via the diff --git a/spring-webmvc/src/main/resources/META-INF/spring-form.tld b/spring-webmvc/src/main/resources/META-INF/spring-form.tld index 872f240ba04..d72708a4d9d 100644 --- a/spring-webmvc/src/main/resources/META-INF/spring-form.tld +++ b/spring-webmvc/src/main/resources/META-INF/spring-form.tld @@ -1,7 +1,7 @@ Spring Framework JSP Form Tag Library diff --git a/spring-webmvc/src/main/resources/META-INF/spring.tld b/spring-webmvc/src/main/resources/META-INF/spring.tld index a9b3744c22c..33eeaf1dec5 100644 --- a/spring-webmvc/src/main/resources/META-INF/spring.tld +++ b/spring-webmvc/src/main/resources/META-INF/spring.tld @@ -1,7 +1,7 @@ Spring Framework JSP Tag Library diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.0.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.0.xsd index c47b42e3ae6..42ef0b4b1e9 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.0.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.1.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.1.xsd index deb0872de82..156c34ebc90 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.1.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.2.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.2.xsd index 2649e87793d..4e0db12aad9 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.2.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-3.2.xsd @@ -7,8 +7,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd index 0ae4616117e..f1a40ac9736 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.0.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd index 13cbef1dd54..e11b5450732 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd index 7e32a96ed8b..b77d9b8e72c 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + @@ -1330,7 +1330,7 @@ diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java index 6b392105e1a..d5080ea71c9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java @@ -86,7 +86,7 @@ public class ContextLoaderTests { /** * Addresses the issues raised in SPR-4008: Supply an opportunity to customize * context before calling refresh in ContextLoaders. */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/CorsRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/CorsRegistryTests.java index 1d0942dea8b..c8b061acee6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/CorsRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/CorsRegistryTests.java @@ -54,13 +54,13 @@ public class CorsRegistryTests { @Test public void customizedMapping() { - this.registry.addMapping("/foo").allowedOrigins("http://domain2.com", "http://domain2.com") + this.registry.addMapping("/foo").allowedOrigins("https://domain2.com", "https://domain2.com") .allowedMethods("DELETE").allowCredentials(false).allowedHeaders("header1", "header2") .exposedHeaders("header3", "header4").maxAge(3600); Map configs = this.registry.getCorsConfigurations(); assertEquals(1, configs.size()); CorsConfiguration config = configs.get("/foo"); - assertEquals(Arrays.asList("http://domain2.com", "http://domain2.com"), config.getAllowedOrigins()); + assertEquals(Arrays.asList("https://domain2.com", "https://domain2.com"), config.getAllowedOrigins()); assertEquals(Arrays.asList("DELETE"), config.getAllowedMethods()); assertEquals(Arrays.asList("header1", "header2"), config.getAllowedHeaders()); assertEquals(Arrays.asList("header3", "header4"), config.getExposedHeaders()); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java index 108ab6e786c..c3f469b50aa 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/CorsAbstractHandlerMappingTests.java @@ -66,7 +66,7 @@ public class CorsAbstractHandlerMappingTests { public void actualRequestWithoutCorsConfigurationProvider() throws Exception { this.request.setMethod(RequestMethod.GET.name()); this.request.setRequestURI("/foo"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); @@ -77,7 +77,7 @@ public class CorsAbstractHandlerMappingTests { public void preflightRequestWithoutCorsConfigurationProvider() throws Exception { this.request.setMethod(RequestMethod.OPTIONS.name()); this.request.setRequestURI("/foo"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); @@ -89,7 +89,7 @@ public class CorsAbstractHandlerMappingTests { public void actualRequestWithCorsConfigurationProvider() throws Exception { this.request.setMethod(RequestMethod.GET.name()); this.request.setRequestURI("/cors"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); @@ -103,7 +103,7 @@ public class CorsAbstractHandlerMappingTests { public void preflightRequestWithCorsConfigurationProvider() throws Exception { this.request.setMethod(RequestMethod.OPTIONS.name()); this.request.setRequestURI("/cors"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); @@ -121,7 +121,7 @@ public class CorsAbstractHandlerMappingTests { this.handlerMapping.setCorsConfigurations(Collections.singletonMap("/foo", config)); this.request.setMethod(RequestMethod.GET.name()); this.request.setRequestURI("/foo"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); @@ -138,7 +138,7 @@ public class CorsAbstractHandlerMappingTests { this.handlerMapping.setCorsConfigurations(Collections.singletonMap("/foo", config)); this.request.setMethod(RequestMethod.OPTIONS.name()); this.request.setRequestURI("/foo"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET"); HandlerExecutionChain chain = handlerMapping.getHandler(this.request); assertNotNull(chain); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/UrlFilenameViewControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/UrlFilenameViewControllerTests.java index 499ee785b8f..90d76ed1ea4 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/UrlFilenameViewControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/UrlFilenameViewControllerTests.java @@ -164,7 +164,7 @@ public class UrlFilenameViewControllerTests { /** * This is the expected behavior, and it now has a test to prove it. - * http://opensource.atlassian.com/projects/spring/browse/SPR-2789 + * https://opensource.atlassian.com/projects/spring/browse/SPR-2789 */ @Test public void nestedPathisUsedAsViewName_InBreakingChangeFromSpring12Line() throws Exception { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java index d567a0be3ea..be4e0996ecc 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java @@ -146,7 +146,7 @@ public class WebContentInterceptorTests { mappings.setProperty("**/*.cache.html", "10"); interceptor.setCacheMappings(mappings); - request.setRequestURI("http://example.org/foo/page.html"); + request.setRequestURI("https://example.org/foo/page.html"); interceptor.preHandle(request, response, null); Iterable expiresHeaders = response.getHeaders("Expires"); @@ -157,7 +157,7 @@ public class WebContentInterceptorTests { assertThat(pragmaHeaders, Matchers.contains("no-cache")); response = new MockHttpServletResponse(); - request.setRequestURI("http://example.org/page.cache.html"); + request.setRequestURI("https://example.org/page.cache.html"); interceptor.preHandle(request, response, null); expiresHeaders = response.getHeaders("Expires"); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java index 65a6466b85a..7231cf91dae 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java @@ -319,7 +319,7 @@ public class RequestMappingInfoTests { @Test public void preFlightRequest() { MockHttpServletRequest request = new MockHttpServletRequest("OPTIONS", "/foo"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain.com"); request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST"); RequestMappingInfo info = new RequestMappingInfo( diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java index f6bdb085f1c..e7452102cfb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/CrossOriginTests.java @@ -77,7 +77,7 @@ public class CrossOriginTests { this.handlerMapping.afterPropertiesSet(); this.request.setMethod("GET"); - this.request.addHeader(HttpHeaders.ORIGIN, "http://domain.com/"); + this.request.addHeader(HttpHeaders.ORIGIN, "https://domain.com/"); } @Test @@ -128,7 +128,7 @@ public class CrossOriginTests { CorsConfiguration config = getCorsConfiguration(chain, false); assertNotNull(config); assertArrayEquals(new String[]{"DELETE"}, config.getAllowedMethods().toArray()); - assertArrayEquals(new String[]{"http://site1.com", "http://site2.com"}, config.getAllowedOrigins().toArray()); + assertArrayEquals(new String[]{"https://site1.com", "https://site2.com"}, config.getAllowedOrigins().toArray()); assertArrayEquals(new String[]{"header1", "header2"}, config.getAllowedHeaders().toArray()); assertArrayEquals(new String[]{"header3", "header4"}, config.getExposedHeaders().toArray()); assertEquals(new Long(123), config.getMaxAge()); @@ -142,7 +142,7 @@ public class CrossOriginTests { HandlerExecutionChain chain = this.handlerMapping.getHandler(request); CorsConfiguration config = getCorsConfiguration(chain, false); assertNotNull(config); - assertEquals(Arrays.asList("http://example.com"), config.getAllowedOrigins()); + assertEquals(Arrays.asList("https://example.com"), config.getAllowedOrigins()); assertTrue(config.getAllowCredentials()); } @@ -192,7 +192,7 @@ public class CrossOriginTests { CorsConfiguration config = getCorsConfiguration(chain, false); assertNotNull(config); assertArrayEquals(new String[]{"GET"}, config.getAllowedMethods().toArray()); - assertArrayEquals(new String[]{"http://foo.com"}, config.getAllowedOrigins().toArray()); + assertArrayEquals(new String[]{"http://www.foo.com/"}, config.getAllowedOrigins().toArray()); assertTrue(config.getAllowCredentials()); } @@ -205,7 +205,7 @@ public class CrossOriginTests { CorsConfiguration config = getCorsConfiguration(chain, false); assertNotNull(config); assertArrayEquals(new String[]{"GET"}, config.getAllowedMethods().toArray()); - assertArrayEquals(new String[]{"http://foo.com"}, config.getAllowedOrigins().toArray()); + assertArrayEquals(new String[]{"http://www.foo.com/"}, config.getAllowedOrigins().toArray()); assertTrue(config.getAllowCredentials()); } @@ -264,7 +264,7 @@ public class CrossOriginTests { @Test public void preFlightRequestWithoutRequestMethodHeader() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest("OPTIONS", "/default"); - request.addHeader(HttpHeaders.ORIGIN, "http://domain2.com"); + request.addHeader(HttpHeaders.ORIGIN, "https://domain2.com"); assertNull(this.handlerMapping.getHandler(request)); } @@ -333,13 +333,13 @@ public class CrossOriginTests { return "{}"; } - @CrossOrigin(origins = { "http://site1.com", "http://site2.com" }, allowedHeaders = { "header1", "header2" }, + @CrossOrigin(origins = { "https://site1.com", "https://site2.com" }, allowedHeaders = { "header1", "header2" }, exposedHeaders = { "header3", "header4" }, methods = RequestMethod.DELETE, maxAge = 123, allowCredentials = "false") @RequestMapping(path = "/customized", method = { RequestMethod.GET, RequestMethod.POST }) public void customized() { } - @CrossOrigin("http://example.com") + @CrossOrigin("https://example.com") @RequestMapping("/customOrigin") public void customOriginDefinedViaValueAttribute() { } @@ -383,7 +383,7 @@ public class CrossOriginTests { } @Controller - @ComposedCrossOrigin(origins = "http://foo.com", allowCredentials = "true") + @ComposedCrossOrigin(origins = "http://www.foo.com/", allowCredentials = "true") private static class ClassLevelMappingWithComposedAnnotation { @RequestMapping(path = "/foo", method = RequestMethod.GET) @@ -396,7 +396,7 @@ public class CrossOriginTests { private static class MethodLevelMappingWithComposedAnnotation { @RequestMapping(path = "/foo", method = RequestMethod.GET) - @ComposedCrossOrigin(origins = "http://foo.com", allowCredentials = "true") + @ComposedCrossOrigin(origins = "http://www.foo.com/", allowCredentials = "true") public void foo() { } } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java index eef99e6523e..0d1412a2a0d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java @@ -116,21 +116,21 @@ public class MvcUriComponentsBuilderTests { @Test public void testFromControllerWithCustomBaseUrlViaStaticCall() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); UriComponents uriComponents = fromController(builder, PersonControllerImpl.class).build(); - assertEquals("http://example.org:9090/base/people", uriComponents.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/people", uriComponents.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test public void testFromControllerWithCustomBaseUrlViaInstance() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); MvcUriComponentsBuilder mvcBuilder = MvcUriComponentsBuilder.relativeTo(builder); UriComponents uriComponents = mvcBuilder.withController(PersonControllerImpl.class).build(); - assertEquals("http://example.org:9090/base/people", uriComponents.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/people", uriComponents.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test @@ -196,23 +196,23 @@ public class MvcUriComponentsBuilderTests { @Test public void testFromMethodNameWithCustomBaseUrlViaStaticCall() throws Exception { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); UriComponents uriComponents = fromMethodName(builder, ControllerWithMethods.class, "methodWithPathVariable", new Object[] {"1"}).build(); - assertEquals("http://example.org:9090/base/something/1/foo", uriComponents.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/something/1/foo", uriComponents.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test public void testFromMethodNameWithCustomBaseUrlViaInstance() throws Exception { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); MvcUriComponentsBuilder mvcBuilder = MvcUriComponentsBuilder.relativeTo(builder); UriComponents uriComponents = mvcBuilder.withMethodName(ControllerWithMethods.class, "methodWithPathVariable", new Object[] {"1"}).build(); - assertEquals("http://example.org:9090/base/something/1/foo", uriComponents.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/something/1/foo", uriComponents.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test @@ -281,21 +281,21 @@ public class MvcUriComponentsBuilderTests { @Test public void testFromMethodCallWithCustomBaseUrlViaStaticCall() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); UriComponents uriComponents = fromMethodCall(builder, on(ControllerWithMethods.class).myMethod(null)).build(); - assertEquals("http://example.org:9090/base/something/else", uriComponents.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/something/else", uriComponents.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test public void testFromMethodCallWithCustomBaseUrlViaInstance() { - UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("http://example.org:9090/base"); + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString("https://example.org:9090/base"); MvcUriComponentsBuilder mvcBuilder = MvcUriComponentsBuilder.relativeTo(builder); UriComponents result = mvcBuilder.withMethodCall(on(ControllerWithMethods.class).myMethod(null)).build(); - assertEquals("http://example.org:9090/base/something/else", result.toString()); - assertEquals("http://example.org:9090/base", builder.toUriString()); + assertEquals("https://example.org:9090/base/something/else", result.toString()); + assertEquals("https://example.org:9090/base", builder.toUriString()); } @Test @@ -324,10 +324,10 @@ public class MvcUriComponentsBuilderTests { this.request.setAttribute(DispatcherServlet.WEB_APPLICATION_CONTEXT_ATTRIBUTE, context); - UriComponentsBuilder baseUrl = UriComponentsBuilder.fromUriString("http://example.org:9999/base"); + UriComponentsBuilder baseUrl = UriComponentsBuilder.fromUriString("https://example.org:9999/base"); MvcUriComponentsBuilder mvcBuilder = MvcUriComponentsBuilder.relativeTo(baseUrl); String url = mvcBuilder.withMappingName("PAC#getAddressesForCountry").arg(0, "DE").buildAndExpand(123); - assertEquals("http://example.org:9999/base/people/123/addresses/DE", url); + assertEquals("https://example.org:9999/base/people/123/addresses/DE", url); } @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java index 01e94692163..c2e4dd63dc4 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java @@ -104,7 +104,7 @@ public class AppCacheManifestTransformerTests { assertThat("should not rewrite external resources", content, Matchers.containsString("//example.org/style.css")); assertThat("should not rewrite external resources", content, - Matchers.containsString("http://example.org/image.png")); + Matchers.containsString("https://example.org/image.png")); assertThat("should generate fingerprint", content, Matchers.containsString("# Hash: 4bf0338bcbeb0a5b3a4ec9ed8864107d")); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java index 9ae03f64319..bfd9372a00d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java @@ -98,7 +98,7 @@ public class CssLinkResourceTransformerTests { Resource resource = transformerChain.transform(this.request, externalCss); TransformedResource transformedResource = (TransformedResource) resource; - String expected = "@import url(\"http://example.org/fonts/css\");\n" + + String expected = "@import url(\"https://example.org/fonts/css\");\n" + "body { background: url(\"file:///home/spring/image.png\") }\n" + "figure { background: url(\"//example.org/style.css\")}"; String result = new String(transformedResource.getByteArray(), "UTF-8"); @@ -106,7 +106,7 @@ public class CssLinkResourceTransformerTests { assertEquals(expected, result); Mockito.verify(resolverChain, Mockito.never()) - .resolveUrlPath("http://example.org/fonts/css", Arrays.asList(externalCss)); + .resolveUrlPath("https://example.org/fonts/css", Arrays.asList(externalCss)); Mockito.verify(resolverChain, Mockito.never()) .resolveUrlPath("file:///home/spring/image.png", Arrays.asList(externalCss)); Mockito.verify(resolverChain, Mockito.never()) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilterTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilterTests.java index d418cda4f70..b4bf15589ea 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilterTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilterTests.java @@ -144,8 +144,8 @@ public class ResourceUrlEncodingFilterTests { this.filter.doFilterInternal(request, response, new FilterChain() { @Override public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { - String result = ((HttpServletResponse)response).encodeURL("/resources/bar.css?foo=bar&url=http://example.org"); - assertEquals("/resources/bar-11e16cf79faee7ac698c805cf28248d2.css?foo=bar&url=http://example.org", result); + String result = ((HttpServletResponse)response).encodeURL("/resources/bar.css?foo=bar&url=https://example.org"); + assertEquals("/resources/bar-11e16cf79faee7ac698c805cf28248d2.css?foo=bar&url=https://example.org", result); } }); } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java index c41cffc113e..cedf3522f81 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java @@ -83,8 +83,8 @@ public class ResourceUrlProviderTests { request.setContextPath("/"); request.setRequestURI("/"); - String url = this.translator.getForRequestUrl(request, "/resources/foo.css?foo=bar&url=http://example.org"); - assertEquals("/resources/foo.css?foo=bar&url=http://example.org", url); + String url = this.translator.getForRequestUrl(request, "/resources/foo.css?foo=bar&url=https://example.org"); + assertEquals("/resources/foo.css?foo=bar&url=https://example.org", url); } @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java index 81668088052..14c62396bb5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java @@ -498,14 +498,14 @@ public class UrlTagTests extends AbstractTagTests { @Test public void createUrlRemoteServer() throws JspException { - tag.setValue("http://www.springframework.org/"); + tag.setValue("https://www.springframework.org/"); tag.doStartTag(); // String uri = tag.createUrl(); String uri = invokeCreateUrl(tag); - assertEquals("http://www.springframework.org/", uri); + assertEquals("https://www.springframework.org/", uri); } @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java index 48647dc6c4b..135e1a4d7c1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java @@ -323,7 +323,7 @@ public class InputTagTests extends AbstractFormTagTests { } /** - * See SPR-3127 (http://opensource.atlassian.com/projects/spring/browse/SPR-3127) + * See SPR-3127 (https://opensource.atlassian.com/projects/spring/browse/SPR-3127) */ @Test public void readOnlyAttributeRenderingWhenReadonlyIsTrue() throws Exception { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java index d215f03d977..8db51d05a69 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java @@ -677,7 +677,7 @@ public class SelectTagTests extends AbstractFormTagTests { /** * Tests new support added as a result of SPR-2660. *

    * Specifically, if the {@code items} attribute is supplied a diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java index 492839cc447..383aebf8db0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java @@ -66,7 +66,7 @@ public class RedirectViewTests { @Test public void http11() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com"); + rv.setUrl("https://url.somewhere.com"); rv.setHttp10Compatible(false); MockHttpServletRequest request = createRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); @@ -74,7 +74,7 @@ public class RedirectViewTests { request.setAttribute(DispatcherServlet.FLASH_MAP_MANAGER_ATTRIBUTE, new SessionFlashMapManager()); rv.render(new HashMap(), request, response); assertEquals(303, response.getStatus()); - assertEquals("http://url.somewhere.com", response.getHeader("Location")); + assertEquals("https://url.somewhere.com", response.getHeader("Location")); } private MockHttpServletRequest createRequest() { @@ -87,57 +87,57 @@ public class RedirectViewTests { @Test public void explicitStatusCodeHttp11() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com"); + rv.setUrl("https://url.somewhere.com"); rv.setHttp10Compatible(false); rv.setStatusCode(HttpStatus.MOVED_PERMANENTLY); MockHttpServletRequest request = createRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); rv.render(new HashMap(), request, response); assertEquals(301, response.getStatus()); - assertEquals("http://url.somewhere.com", response.getHeader("Location")); + assertEquals("https://url.somewhere.com", response.getHeader("Location")); } @Test public void explicitStatusCodeHttp10() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com"); + rv.setUrl("https://url.somewhere.com"); rv.setStatusCode(HttpStatus.MOVED_PERMANENTLY); MockHttpServletRequest request = createRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); rv.render(new HashMap(), request, response); assertEquals(301, response.getStatus()); - assertEquals("http://url.somewhere.com", response.getHeader("Location")); + assertEquals("https://url.somewhere.com", response.getHeader("Location")); } @Test public void attributeStatusCodeHttp10() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com"); + rv.setUrl("https://url.somewhere.com"); MockHttpServletRequest request = createRequest(); request.setAttribute(View.RESPONSE_STATUS_ATTRIBUTE, HttpStatus.CREATED); MockHttpServletResponse response = new MockHttpServletResponse(); rv.render(new HashMap(), request, response); assertEquals(201, response.getStatus()); - assertEquals("http://url.somewhere.com", response.getHeader("Location")); + assertEquals("https://url.somewhere.com", response.getHeader("Location")); } @Test public void attributeStatusCodeHttp11() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com"); + rv.setUrl("https://url.somewhere.com"); rv.setHttp10Compatible(false); MockHttpServletRequest request = createRequest(); request.setAttribute(View.RESPONSE_STATUS_ATTRIBUTE, HttpStatus.CREATED); MockHttpServletResponse response = new MockHttpServletResponse(); rv.render(new HashMap(), request, response); assertEquals(201, response.getStatus()); - assertEquals("http://url.somewhere.com", response.getHeader("Location")); + assertEquals("https://url.somewhere.com", response.getHeader("Location")); } @Test public void flashMap() throws Exception { RedirectView rv = new RedirectView(); - rv.setUrl("http://url.somewhere.com/path"); + rv.setUrl("https://url.somewhere.com/path"); rv.setHttp10Compatible(false); MockHttpServletRequest request = createRequest(); HttpServletResponse response = new MockHttpServletResponse(); @@ -147,7 +147,7 @@ public class RedirectViewTests { ModelMap model = new ModelMap("id", "1"); rv.render(model, request, response); assertEquals(303, response.getStatus()); - assertEquals("http://url.somewhere.com/path?id=1", response.getHeader("Location")); + assertEquals("https://url.somewhere.com/path?id=1", response.getHeader("Location")); assertEquals("/path", flashMap.getTargetRequestPath()); assertEquals(model, flashMap.getTargetRequestParams().toSingleValueMap()); @@ -223,7 +223,7 @@ public class RedirectViewTests { @Test public void singleParam() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; String val = "bar"; Map model = new HashMap(); @@ -234,7 +234,7 @@ public class RedirectViewTests { @Test public void singleParamWithoutExposingModelAttributes() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; String val = "bar"; Map model = new HashMap(); @@ -245,12 +245,12 @@ public class RedirectViewTests { @Test public void paramWithAnchor() throws Exception { - String url = "http://url.somewhere.com/test.htm#myAnchor"; + String url = "https://url.somewhere.com/test.htm#myAnchor"; String key = "foo"; String val = "bar"; Map model = new HashMap(); model.put(key, val); - String expectedUrlForEncoding = "http://url.somewhere.com/test.htm" + "?" + key + "=" + val + "#myAnchor"; + String expectedUrlForEncoding = "https://url.somewhere.com/test.htm" + "?" + key + "=" + val + "#myAnchor"; doTest(model, url, false, expectedUrlForEncoding); } @@ -262,7 +262,7 @@ public class RedirectViewTests { @Test public void twoParams() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; String val = "bar"; String key2 = "thisIsKey2"; @@ -271,37 +271,37 @@ public class RedirectViewTests { model.put(key, val); model.put(key2, val2); try { - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val + "&" + key2 + "=" + val2; + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val + "&" + key2 + "=" + val2; doTest(model, url, false, expectedUrlForEncoding); } catch (AssertionError err) { // OK, so it's the other order... probably on Sun JDK 1.6 or IBM JDK 1.5 - String expectedUrlForEncoding = "http://url.somewhere.com?" + key2 + "=" + val2 + "&" + key + "=" + val; + String expectedUrlForEncoding = "https://url.somewhere.com?" + key2 + "=" + val2 + "&" + key + "=" + val; doTest(model, url, false, expectedUrlForEncoding); } } @Test public void arrayParam() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; String[] val = new String[] {"bar", "baz"}; Map model = new HashMap(); model.put(key, val); try { - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val[0] + "&" + key + "=" + val[1]; + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val[0] + "&" + key + "=" + val[1]; doTest(model, url, false, expectedUrlForEncoding); } catch (AssertionError err) { // OK, so it's the other order... probably on Sun JDK 1.6 or IBM JDK 1.5 - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val[1] + "&" + key + "=" + val[0]; + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val[1] + "&" + key + "=" + val[0]; doTest(model, url, false, expectedUrlForEncoding); } } @Test public void collectionParam() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; List val = new ArrayList(); val.add("bar"); @@ -309,19 +309,19 @@ public class RedirectViewTests { Map> model = new HashMap>(); model.put(key, val); try { - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val.get(0) + "&" + key + "=" + val.get(1); + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val.get(0) + "&" + key + "=" + val.get(1); doTest(model, url, false, expectedUrlForEncoding); } catch (AssertionError err) { // OK, so it's the other order... probably on Sun JDK 1.6 or IBM JDK 1.5 - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val.get(1) + "&" + key + "=" + val.get(0); + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val.get(1) + "&" + key + "=" + val.get(0); doTest(model, url, false, expectedUrlForEncoding); } } @Test public void objectConversion() throws Exception { - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; String key = "foo"; String val = "bar"; String key2 = "int2"; @@ -332,7 +332,7 @@ public class RedirectViewTests { model.put(key, val); model.put(key2, val2); model.put(key3, val3); - String expectedUrlForEncoding = "http://url.somewhere.com?" + key + "=" + val + "&" + key2 + "=" + val2; + String expectedUrlForEncoding = "https://url.somewhere.com?" + key + "=" + val + "&" + key2 + "=" + val2; doTest(model, url, false, expectedUrlForEncoding); } @@ -340,13 +340,13 @@ public class RedirectViewTests { public void propagateQueryParams() throws Exception { RedirectView rv = new RedirectView(); rv.setPropagateQueryParams(true); - rv.setUrl("http://url.somewhere.com?foo=bar#bazz"); + rv.setUrl("https://url.somewhere.com?foo=bar#bazz"); MockHttpServletRequest request = createRequest(); MockHttpServletResponse response = new MockHttpServletResponse(); request.setQueryString("a=b&c=d"); rv.render(new HashMap(), request, response); assertEquals(302, response.getStatus()); - assertEquals("http://url.somewhere.com?foo=bar&a=b&c=d#bazz", response.getHeader("Location")); + assertEquals("https://url.somewhere.com?foo=bar&a=b&c=d#bazz", response.getHeader("Location")); } private void doTest(Map map, String url, boolean contextRelative, String expectedUrlForEncoding) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java index 4c0d3ae6f78..378a4256b32 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java @@ -51,7 +51,7 @@ public class RedirectViewUriTemplateTests { Map model = new HashMap(); model.put("foo", "bar"); - String baseUrl = "http://url.somewhere.com"; + String baseUrl = "https://url.somewhere.com"; RedirectView redirectView = new RedirectView(baseUrl + "/{foo}"); redirectView.renderMergedOutputModel(model, this.request, this.response); @@ -63,7 +63,7 @@ public class RedirectViewUriTemplateTests { Map model = new HashMap(); model.put("foo", "bar/bar baz"); - String baseUrl = "http://url.somewhere.com"; + String baseUrl = "https://url.somewhere.com"; RedirectView redirectView = new RedirectView(baseUrl + "/context path/{foo}"); redirectView.renderMergedOutputModel(model, this.request, this.response); @@ -106,7 +106,7 @@ public class RedirectViewUriTemplateTests { currentRequestUriTemplateVars.put("var3", "v3"); this.request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, currentRequestUriTemplateVars); - String url = "http://url.somewhere.com"; + String url = "https://url.somewhere.com"; RedirectView redirectView = new RedirectView(url + "/{key1}/{var1}/{name}"); redirectView.renderMergedOutputModel(model, this.request, this.response); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java index 65d42184eb8..a2dcad5cfa2 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java @@ -328,7 +328,7 @@ public class ExcelViewTests { /** * Workaround JXL bug that causes ArrayIndexOutOfBounds exceptions when running in - * *nix machines. Same bug as reported at http://jira.pentaho.com/browse/PDI-5031. + * *nix machines. Same bug as reported at https://jira.pentaho.com/browse/PDI-5031. *

    We want to use the latest JXL code because it doesn't include log4j config files * inside the jar. Since the project appears to be abandoned, AbstractJExcelView is * deprecated as of Spring 4.0. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java index f98d8e320c8..1344016c09f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java @@ -61,7 +61,7 @@ public class RssFeedViewTests { view.render(model, request, response); assertEquals("Invalid content-type", "application/rss+xml", response.getContentType()); String expected = "" + - "Test Feedhttp://example.comTest feed description" + + "Test Feedhttps://example.comTest feed description" + "2This is entry 2" + "1This is entry 1" + ""; assertXMLEqual(expected, response.getContentAsString()); @@ -74,7 +74,7 @@ public class RssFeedViewTests { protected void buildFeedMetadata(Map model, Channel channel, HttpServletRequest request) { channel.setTitle("Test Feed"); channel.setDescription("Test feed description"); - channel.setLink("http://example.com"); + channel.setLink("https://example.com"); } @Override diff --git a/spring-webmvc/src/test/resources/org/springframework/web/servlet/config/annotation/WEB-INF/index.jsp b/spring-webmvc/src/test/resources/org/springframework/web/servlet/config/annotation/WEB-INF/index.jsp index 46df8a3f54b..1932b62f019 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/servlet/config/annotation/WEB-INF/index.jsp +++ b/spring-webmvc/src/test/resources/org/springframework/web/servlet/config/annotation/WEB-INF/index.jsp @@ -1,5 +1,5 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/appcache.manifest b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/appcache.manifest index 76e2f32a98d..986d1055a64 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/appcache.manifest +++ b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/appcache.manifest @@ -11,7 +11,7 @@ NETWORK: CACHE: js/bar.js -http://example.org/image.png +https://example.org/image.png FALLBACK: /main /static.html \ No newline at end of file diff --git a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/external.css b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/external.css index d21e42aaf2a..01b801aee03 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/external.css +++ b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/external.css @@ -1,3 +1,3 @@ -@import url("http://example.org/fonts/css"); +@import url("https://example.org/fonts/css"); body { background: url("file:///home/spring/image.png") } figure { background: url("//example.org/style.css")} \ No newline at end of file diff --git a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/foo.html b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/foo.html index 83ff005e6bf..b2f02184a64 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/foo.html +++ b/spring-webmvc/src/test/resources/org/springframework/web/servlet/resource/test/foo.html @@ -1,4 +1,4 @@ - + diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java b/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java index 4ae061e0d42..d6753419891 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java @@ -24,7 +24,7 @@ import java.util.List; * @author Rossen Stoyanchev * @since 4.0 * @see WebSocketHandler - * @see RFC-6455 section 1.9 + * @see RFC-6455 section 1.9 */ public interface SubProtocolCapable { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java index 280d0bd0e1a..1d4847a0d86 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java @@ -38,7 +38,7 @@ import org.springframework.util.StringUtils; * * *

    WebSocket Extension HTTP headers may include parameters and follow - * RFC 7230 section 3.2

    + * RFC 7230 section 3.2

    * *

    Note that the order of extensions in HTTP headers defines their order of execution, * e.g. extensions "foo, bar" will be executed as "bar(foo(message))".

    diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptor.java b/spring-websocket/src/main/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptor.java index 3c6a8721844..5915a4a11b5 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptor.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptor.java @@ -67,7 +67,7 @@ public class OriginHandshakeInterceptor implements HandshakeInterceptor { * designed for browsers. There is nothing preventing other types of client * to modify the {@code Origin} header value. *

    Each provided allowed origin must have a scheme, and optionally a port - * (e.g. "http://example.org", "http://example.org:9090"). An allowed origin + * (e.g. "https://example.org", "https://example.org:9090"). An allowed origin * string may also be "*" in which case all origins are allowed. * @see RFC 6454: The Web Origin Concept */ diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java index 3219cafc16c..e79dcd36fd1 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java @@ -39,7 +39,7 @@ public interface SockJsService { /** * Process a SockJS HTTP request. *

    See the "Base URL", "Static URLs", and "Session URLs" sections of the SockJS + * href="https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html">SockJS * protocol for details on the types of URLs expected. * @param request the current request * @param response the current response diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java index 17301e99d4e..3f61548bb98 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java @@ -56,7 +56,7 @@ import org.springframework.web.util.UriComponentsBuilder; * * @author Rossen Stoyanchev * @since 4.1 - * @see http://sockjs.org + * @see https://github.com/sockjs/sockjs-client * @see org.springframework.web.socket.sockjs.client.Transport */ public class SockJsClient implements WebSocketClient, Lifecycle { diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java index 0630734eb9f..4ffd68973f4 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java @@ -46,7 +46,7 @@ public abstract class AbstractSockJsMessageCodec implements SockJsMessageCodec { } /** - * Apply standard JSON string quoting (see http://www.json.org/). + * Apply standard JSON string quoting (see https://www.json.org/). */ protected abstract char[] applyJsonQuoting(String content); diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java index 4f7e01b8d3d..c9b9569751f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java @@ -303,7 +303,7 @@ public abstract class AbstractSockJsService implements SockJsService, CorsConfig * transports) are disabled. As a consequence, IE 6 to 9 are not supported * when origins are restricted. *

    Each provided allowed origin must have a scheme, and optionally a port - * (e.g. "http://example.org", "http://example.org:9090"). An allowed origin + * (e.g. "https://example.org", "https://example.org:9090"). An allowed origin * string may also be "*" in which case all origins are allowed. * @since 4.1.2 * @see RFC 6454: The Web Origin Concept diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/EventSourceTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/EventSourceTransportHandler.java index 795eadad36e..f4d7cda7021 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/EventSourceTransportHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/EventSourceTransportHandler.java @@ -29,7 +29,7 @@ import org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSe /** * A TransportHandler for sending messages via Server-Sent events: - * http://dev.w3.org/html5/eventsource/. + * https://dev.w3.org/html5/eventsource/. * * @author Rossen Stoyanchev * @since 4.0 diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java index 3b0c4aa76e0..acb6a2f0bc8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/HtmlFileTransportHandler.java @@ -39,8 +39,8 @@ import org.springframework.web.util.JavaScriptUtils; /** * An HTTP {@link TransportHandler} that uses a famous browser document.domain technique: - * - * http://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do + * + * https://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do * * @author Rossen Stoyanchev * @since 4.0 @@ -50,7 +50,7 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle private static final String PARTIAL_HTML_CONTENT; // Safari needs at least 1024 bytes to parse the website. - // http://code.google.com/p/browsersec/wiki/Part2#Survey_of_content_sniffing_behaviors + // https://code.google.com/p/browsersec/wiki/Part2#Survey_of_content_sniffing_behaviors private static final int MINIMUM_PARTIAL_HTML_CONTENT_LENGTH = 1024; diff --git a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd index 36fa8af6564..da804310269 100644 --- a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd +++ b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.0.xsd @@ -7,7 +7,7 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - + diff --git a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.1.xsd b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.1.xsd index a5cabbd6594..525de21fcdb 100644 --- a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.1.xsd +++ b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.1.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.2.xsd b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.2.xsd index f6a8718a181..8cc5d258928 100644 --- a/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.2.xsd +++ b/spring-websocket/src/main/resources/org/springframework/web/socket/config/spring-websocket-4.2.xsd @@ -8,8 +8,8 @@ elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java index 894717cc614..7946dafca2e 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java @@ -109,7 +109,7 @@ public class WebMvcStompWebSocketEndpointRegistrationTests { WebMvcStompWebSocketEndpointRegistration registration = new WebMvcStompWebSocketEndpointRegistration(new String[] {"/foo"}, this.handler, this.scheduler); - String origin = "http://mydomain.com"; + String origin = "https://mydomain.com"; registration.setAllowedOrigins(origin).withSockJS(); MultiValueMap mappings = registration.getMappings(); @@ -178,7 +178,7 @@ public class WebMvcStompWebSocketEndpointRegistrationTests { DefaultHandshakeHandler handshakeHandler = new DefaultHandshakeHandler(); HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor(); - String origin = "http://mydomain.com"; + String origin = "https://mydomain.com"; registration.setHandshakeHandler(handshakeHandler).addInterceptors(interceptor).setAllowedOrigins(origin); MultiValueMap mappings = registration.getMappings(); @@ -232,7 +232,7 @@ public class WebMvcStompWebSocketEndpointRegistrationTests { DefaultHandshakeHandler handshakeHandler = new DefaultHandshakeHandler(); HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor(); - String origin = "http://mydomain.com"; + String origin = "https://mydomain.com"; registration.setHandshakeHandler(handshakeHandler).addInterceptors(interceptor).setAllowedOrigins(origin).withSockJS(); diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java index a6bd2be2fa0..17c396bc4cb 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java @@ -119,7 +119,7 @@ public class WebSocketHandlerRegistrationTests { WebSocketHandler handler = new TextWebSocketHandler(); HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor(); - this.registration.addHandler(handler, "/foo").addInterceptors(interceptor).setAllowedOrigins("http://mydomain1.com"); + this.registration.addHandler(handler, "/foo").addInterceptors(interceptor).setAllowedOrigins("https://mydomain1.com"); List mappings = this.registration.getMappings(); assertEquals(1, mappings.size()); @@ -138,7 +138,7 @@ public class WebSocketHandlerRegistrationTests { HttpSessionHandshakeInterceptor interceptor = new HttpSessionHandshakeInterceptor(); this.registration.addHandler(handler, "/foo").addInterceptors(interceptor) - .setAllowedOrigins("http://mydomain1.com").withSockJS(); + .setAllowedOrigins("https://mydomain1.com").withSockJS(); List mappings = this.registration.getMappings(); assertEquals(1, mappings.size()); @@ -147,7 +147,7 @@ public class WebSocketHandlerRegistrationTests { assertEquals(handler, mapping.webSocketHandler); assertEquals("/foo/**", mapping.path); assertNotNull(mapping.sockJsService); - assertTrue(mapping.sockJsService.getAllowedOrigins().contains("http://mydomain1.com")); + assertTrue(mapping.sockJsService.getAllowedOrigins().contains("https://mydomain1.com")); List interceptors = mapping.sockJsService.getHandshakeInterceptors(); assertEquals(interceptor, interceptors.get(0)); assertEquals(OriginHandshakeInterceptor.class, interceptors.get(1).getClass()); diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptorTests.java index a419d5adc5e..9f4c09079ec 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/OriginHandshakeInterceptorTests.java @@ -49,8 +49,8 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { public void originValueMatch() throws Exception { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain1.com"); - List allowed = Collections.singletonList("http://mydomain1.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain1.com"); + List allowed = Collections.singletonList("https://mydomain1.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(allowed); assertTrue(interceptor.beforeHandshake(request, response, wsHandler, attributes)); assertNotEquals(servletResponse.getStatus(), HttpStatus.FORBIDDEN.value()); @@ -60,7 +60,7 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { public void originValueNoMatch() throws Exception { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain1.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain1.com"); List allowed = Collections.singletonList("http://mydomain2.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(allowed); assertFalse(interceptor.beforeHandshake(request, response, wsHandler, attributes)); @@ -72,7 +72,7 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain2.com"); - List allowed = Arrays.asList("http://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com"); + List allowed = Arrays.asList("https://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(allowed); assertTrue(interceptor.beforeHandshake(request, response, wsHandler, attributes)); assertNotEquals(servletResponse.getStatus(), HttpStatus.FORBIDDEN.value()); @@ -82,8 +82,8 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { public void originListNoMatch() throws Exception { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain4.com"); - List allowed = Arrays.asList("http://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://www.mydomain4.com/"); + List allowed = Arrays.asList("https://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(allowed); assertFalse(interceptor.beforeHandshake(request, response, wsHandler, attributes)); assertEquals(servletResponse.getStatus(), HttpStatus.FORBIDDEN.value()); @@ -93,10 +93,10 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { public void originNoMatchWithNullHostileCollection() throws Exception { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain4.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://www.mydomain4.com/"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(); Set allowedOrigins = new ConcurrentSkipListSet(); - allowedOrigins.add("http://mydomain1.com"); + allowedOrigins.add("https://mydomain1.com"); interceptor.setAllowedOrigins(allowedOrigins); assertFalse(interceptor.beforeHandshake(request, response, wsHandler, attributes)); assertEquals(servletResponse.getStatus(), HttpStatus.FORBIDDEN.value()); @@ -106,7 +106,7 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { public void originMatchAll() throws Exception { Map attributes = new HashMap(); WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain1.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain1.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(); interceptor.setAllowedOrigins(Collections.singletonList("*")); assertTrue(interceptor.beforeHandshake(request, response, wsHandler, attributes)); @@ -130,7 +130,7 @@ public class OriginHandshakeInterceptorTests extends AbstractHttpRequestTests { WebSocketHandler wsHandler = Mockito.mock(WebSocketHandler.class); this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain2.com"); this.servletRequest.setServerName("mydomain2.com"); - OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(Arrays.asList("http://mydomain1.com")); + OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(Arrays.asList("https://mydomain1.com")); assertTrue(interceptor.beforeHandshake(request, response, wsHandler, attributes)); assertNotEquals(servletResponse.getStatus(), HttpStatus.FORBIDDEN.value()); } diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java index ef1bdd5aa2e..ab6f98c35e4 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java @@ -62,7 +62,7 @@ public class ClientSockJsSessionTests { @Before public void setup() throws Exception { - SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("http://example.com")); + SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("https://example.com")); Transport transport = mock(Transport.class); TransportRequest request = new DefaultTransportRequest(urlInfo, null, null, transport, TransportType.XHR, CODEC); this.handler = mock(WebSocketHandler.class); diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java index d990d361145..b6af54dbce1 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java @@ -126,7 +126,7 @@ public class DefaultTransportRequestTests { } protected DefaultTransportRequest createTransportRequest(Transport transport, TransportType type) throws Exception { - SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("http://example.com")); + SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("https://example.com")); return new DefaultTransportRequest(urlInfo, new HttpHeaders(), new HttpHeaders(), transport, type, CODEC); } diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java index 1cd5b0a280d..51df8c14d67 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java @@ -179,7 +179,7 @@ public class RestTemplateXhrTransportTests { RestTemplateXhrTransport transport = new RestTemplateXhrTransport(restTemplate); transport.setTaskExecutor(new SyncTaskExecutor()); - SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("http://example.com")); + SockJsUrlInfo urlInfo = new SockJsUrlInfo(new URI("https://example.com")); HttpHeaders headers = new HttpHeaders(); headers.add("h-foo", "h-bar"); TransportRequest request = new DefaultTransportRequest(urlInfo, headers, headers, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java index 12c72587c7e..defdb431e4d 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java @@ -52,7 +52,7 @@ import static org.mockito.BDDMockito.when; */ public class SockJsClientTests { - private static final String URL = "http://example.com"; + private static final String URL = "https://example.com"; private static final WebSocketHandler handler = mock(WebSocketHandler.class); diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java index 8735b11a976..f751d4e31b1 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java @@ -36,14 +36,14 @@ public class SockJsUrlInfoTests { @Test public void serverId() throws Exception { - SockJsUrlInfo info = new SockJsUrlInfo(new URI("http://example.com")); + SockJsUrlInfo info = new SockJsUrlInfo(new URI("https://example.com")); int serverId = Integer.valueOf(info.getServerId()); assertTrue("Invalid serverId: " + serverId, serverId >= 0 && serverId < 1000); } @Test public void sessionId() throws Exception { - SockJsUrlInfo info = new SockJsUrlInfo(new URI("http://example.com")); + SockJsUrlInfo info = new SockJsUrlInfo(new URI("https://example.com")); assertEquals("Invalid sessionId: " + info.getSessionId(), 32, info.getSessionId().length()); } diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java index 96fe23533f8..108731396f6 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java @@ -46,14 +46,14 @@ public class XhrTransportTests { public void infoResponse() throws Exception { TestXhrTransport transport = new TestXhrTransport(); transport.infoResponseToReturn = new ResponseEntity<>("body", HttpStatus.OK); - assertEquals("body", transport.executeInfoRequest(new URI("http://example.com/info"), null)); + assertEquals("body", transport.executeInfoRequest(new URI("https://example.com/info"), null)); } @Test(expected = HttpServerErrorException.class) public void infoResponseError() throws Exception { TestXhrTransport transport = new TestXhrTransport(); transport.infoResponseToReturn = new ResponseEntity<>("body", HttpStatus.BAD_REQUEST); - assertEquals("body", transport.executeInfoRequest(new URI("http://example.com/info"), null)); + assertEquals("body", transport.executeInfoRequest(new URI("https://example.com/info"), null)); } @Test @@ -63,7 +63,7 @@ public class XhrTransportTests { requestHeaders.setContentType(MediaType.APPLICATION_JSON); TestXhrTransport transport = new TestXhrTransport(); transport.sendMessageResponseToReturn = new ResponseEntity<>(HttpStatus.NO_CONTENT); - URI url = new URI("http://example.com"); + URI url = new URI("https://example.com"); transport.executeSendRequest(url, requestHeaders, new TextMessage("payload")); assertEquals(2, transport.actualSendRequestHeaders.size()); assertEquals("bar", transport.actualSendRequestHeaders.getFirst("foo")); @@ -74,7 +74,7 @@ public class XhrTransportTests { public void sendMessageError() throws Exception { TestXhrTransport transport = new TestXhrTransport(); transport.sendMessageResponseToReturn = new ResponseEntity<>(HttpStatus.BAD_REQUEST); - URI url = new URI("http://example.com"); + URI url = new URI("https://example.com"); transport.executeSendRequest(url, null, new TextMessage("payload")); } @@ -85,7 +85,7 @@ public class XhrTransportTests { handshakeHeaders.setOrigin("foo"); TransportRequest request = mock(TransportRequest.class); - given(request.getSockJsUrlInfo()).willReturn(new SockJsUrlInfo(new URI("http://example.com"))); + given(request.getSockJsUrlInfo()).willReturn(new SockJsUrlInfo(new URI("https://example.com"))); given(request.getHandshakeHeaders()).willReturn(handshakeHeaders); HttpHeaders requestHeaders = new HttpHeaders(); diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java index 0e76844dd50..4ae627e9fcb 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/support/SockJsServiceTests.java @@ -102,7 +102,7 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { assertEquals(",\"origins\":[\"*:*\"],\"cookie_needed\":false,\"websocket\":false}", body.substring(body.indexOf(','))); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("GET", "/echo/info", HttpStatus.OK); assertNull(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); assertNull(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS)); @@ -121,17 +121,17 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { assertEquals("{\"entropy\"", body.substring(0, body.indexOf(':'))); assertEquals(",\"origins\":[\"*:*\"],\"cookie_needed\":true,\"websocket\":true}", body.substring(body.indexOf(','))); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("GET", "/echo/info", HttpStatus.OK); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); resetResponseAndHandleRequest("GET", "/echo/info", HttpStatus.OK); this.service.setAllowedOrigins(Arrays.asList("*")); resetResponseAndHandleRequest("GET", "/echo/info", HttpStatus.OK); this.servletRequest.setServerName("mydomain3.com"); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("GET", "/echo/info", HttpStatus.FORBIDDEN); } @@ -166,7 +166,7 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNull(this.service.getCorsConfiguration(this.servletRequest)); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNull(this.service.getCorsConfiguration(this.servletRequest)); } @@ -180,11 +180,11 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNotNull(this.service.getCorsConfiguration(this.servletRequest)); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNotNull(this.service.getCorsConfiguration(this.servletRequest)); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNotNull(this.service.getCorsConfiguration(this.servletRequest)); @@ -193,7 +193,7 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { assertNotNull(this.service.getCorsConfiguration(this.servletRequest)); this.servletRequest.setServerName("mydomain3.com"); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.FORBIDDEN); } @@ -207,11 +207,11 @@ public class SockJsServiceTests extends AbstractHttpRequestTests { resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNull(this.service.getCorsConfiguration(this.servletRequest)); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.FORBIDDEN); assertNull(this.service.getCorsConfiguration(this.servletRequest)); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com", "http://mydomain2.com", "http://mydomain3.com")); resetResponseAndHandleRequest("OPTIONS", "/echo/info", HttpStatus.NO_CONTENT); assertNull(this.service.getCorsConfiguration(this.servletRequest)); } diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java index 59feea883f8..b10cc6dfc18 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java @@ -157,8 +157,8 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { public void handleTransportRequestXhrAllowedOriginsMatch() throws Exception { String sockJsPath = sessionUrlPrefix + "xhr"; setRequest("POST", sockJsPrefix + sockJsPath); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com", "http://mydomain2.com")); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain1.com"); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com", "http://mydomain2.com")); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain1.com"); this.service.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); assertEquals(200, this.servletResponse.getStatus()); @@ -168,7 +168,7 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { public void handleTransportRequestXhrAllowedOriginsNoMatch() throws Exception { String sockJsPath = sessionUrlPrefix + "xhr"; setRequest("POST", sockJsPrefix + sockJsPath); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com", "http://mydomain2.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com", "http://mydomain2.com")); this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain3.com"); this.service.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); @@ -179,7 +179,7 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { public void handleTransportRequestXhrSameOrigin() throws Exception { String sockJsPath = sessionUrlPrefix + "xhr"; setRequest("POST", sockJsPrefix + sockJsPath); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain2.com"); this.servletRequest.setServerName("mydomain2.com"); this.service.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); @@ -191,7 +191,7 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { public void handleInvalidTransportType() throws Exception { String sockJsPath = sessionUrlPrefix + "invalid"; setRequest("POST", sockJsPrefix + sockJsPath); - this.service.setAllowedOrigins(Arrays.asList("http://mydomain1.com")); + this.service.setAllowedOrigins(Arrays.asList("https://mydomain1.com")); this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain2.com"); this.servletRequest.setServerName("mydomain2.com"); this.service.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); @@ -276,7 +276,7 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { assertEquals(404, this.servletResponse.getStatus()); resetRequestAndResponse(); - jsonpService.setAllowedOrigins(Collections.singletonList("http://mydomain1.com")); + jsonpService.setAllowedOrigins(Collections.singletonList("https://mydomain1.com")); setRequest("GET", sockJsPrefix + sockJsPath); jsonpService.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); assertEquals(404, this.servletResponse.getStatus()); @@ -297,11 +297,11 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { assertNotEquals(403, this.servletResponse.getStatus()); resetRequestAndResponse(); - List allowed = Collections.singletonList("http://mydomain1.com"); + List allowed = Collections.singletonList("https://mydomain1.com"); OriginHandshakeInterceptor interceptor = new OriginHandshakeInterceptor(allowed); wsService.setHandshakeInterceptors(Collections.singletonList(interceptor)); setRequest("GET", sockJsPrefix + sockJsPath); - this.servletRequest.addHeader(HttpHeaders.ORIGIN, "http://mydomain1.com"); + this.servletRequest.addHeader(HttpHeaders.ORIGIN, "https://mydomain1.com"); wsService.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); assertNotEquals(403, this.servletResponse.getStatus()); @@ -322,7 +322,7 @@ public class DefaultSockJsServiceTests extends AbstractHttpRequestTests { resetRequestAndResponse(); setRequest("GET", sockJsPrefix + sockJsPath); - this.service.setAllowedOrigins(Collections.singletonList("http://mydomain1.com")); + this.service.setAllowedOrigins(Collections.singletonList("https://mydomain1.com")); this.service.handleRequest(this.request, this.response, sockJsPath, this.wsHandler); assertEquals(404, this.servletResponse.getStatus()); assertNull(this.servletResponse.getHeader("X-Frame-Options")); diff --git a/src/api/overview.html b/src/api/overview.html index 2ca88cfaf34..f37932935e5 100644 --- a/src/api/overview.html +++ b/src/api/overview.html @@ -1,7 +1,7 @@

    -This is the public API documentation for the Spring Framework. +This is the public API documentation for the Spring Framework.

    diff --git a/src/asciidoc/appendix.adoc b/src/asciidoc/appendix.adoc index 98091becf4b..82d0cd8002b 100644 --- a/src/asciidoc/appendix.adoc +++ b/src/asciidoc/appendix.adoc @@ -2102,7 +2102,7 @@ following change. ---- + "https://www.springframework.org/dtd/spring-beans-2.0.dtd"> @@ -2120,7 +2120,7 @@ The equivalent file in the XML Schema-style would be... + http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -2165,8 +2165,8 @@ correct schema so that the tags in the `util` namespace are available to you. + 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"__> ---- @@ -2659,8 +2659,8 @@ correct schema so that the tags in the `jee` namespace are available to you. + 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"__> ---- @@ -2912,8 +2912,8 @@ are available to you. + 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"__> ---- @@ -2940,8 +2940,8 @@ are available to you. + 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"__> ---- @@ -2978,9 +2978,9 @@ are available to you. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" __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 + http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd __http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd__ - http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> + http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd"> ---- @@ -3014,8 +3014,8 @@ are available to you. + 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"__> ---- @@ -3038,8 +3038,8 @@ available to you. + 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"__> ---- @@ -3138,8 +3138,8 @@ correct schema so that the tags in the `jdbc` namespace are available to you. + 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"__> ---- @@ -3164,8 +3164,8 @@ the correct schema so that the tags in the `cache` namespace are available to yo + 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/jdbc/spring-cache.xsd"__> ---- @@ -3198,7 +3198,7 @@ as-is). + http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> ____ @@ -3522,7 +3522,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"> @@ -3560,7 +3560,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"> @@ -3788,7 +3788,7 @@ additional attribute to the existing bean definition element. By way of another example, let's say that the service class that you are defining a bean definition for a service object that will (unknown to it) be accessing a clustered -http://jcp.org/en/jsr/detail?id=107[JCache], and you want to ensure that the named +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: [source,xml,indent=0] @@ -3946,9 +3946,9 @@ http\://www.foo.com/schema/jcache/jcache.xsd=com/foo/jcache.xsd Find below links to further resources concerning XML Schema and the extensible XML support described in this chapter. -* The http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/[XML Schema Part 1: Structures +* The https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/[XML Schema Part 1: Structures Second Edition] -* The http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/[XML Schema Part 2: Datatypes +* The https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/[XML Schema Part 2: Datatypes Second Edition] diff --git a/src/asciidoc/appx-spring-form-tld.adoc b/src/asciidoc/appx-spring-form-tld.adoc index fd5ac0bdc7a..c0c3ad33f00 100644 --- a/src/asciidoc/appx-spring-form-tld.adoc +++ b/src/asciidoc/appx-spring-form-tld.adoc @@ -10,8 +10,8 @@ provides you with some tags for evaluating errors, setting themes and outputting internationalized messages. Please note that the various tags generated by this form tag library are compliant with -the http://www.w3.org/TR/xhtml1/[XHTML-1.0-Strict specification] and attendant -http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict[DTD]. +the https://www.w3.org/TR/xhtml1/[XHTML-1.0-Strict specification] and attendant +https://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict[DTD]. This appendix describes the `spring-form.tld` tag library. diff --git a/src/asciidoc/appx-spring-tld.adoc b/src/asciidoc/appx-spring-tld.adoc index 3d12186fe00..1f9a47be022 100644 --- a/src/asciidoc/appx-spring-tld.adoc +++ b/src/asciidoc/appx-spring-tld.adoc @@ -10,8 +10,8 @@ provides you with some tags for evaluating errors, setting themes and outputting internationalized messages. Please note that the various tags generated by this form tag library are compliant with -the http://www.w3.org/TR/xhtml1/[XHTML-1.0-Strict specification] and attendant -http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict[DTD]. +the https://www.w3.org/TR/xhtml1/[XHTML-1.0-Strict specification] and attendant +https://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict[DTD]. This appendix describes the `spring.tld` tag library. diff --git a/src/asciidoc/core-aop.adoc b/src/asciidoc/core-aop.adoc index 57dffd371a0..a469099f795 100644 --- a/src/asciidoc/core-aop.adoc +++ b/src/asciidoc/core-aop.adoc @@ -204,7 +204,7 @@ implementation detail actually means. == @AspectJ support @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. @@ -348,9 +348,9 @@ will match 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 Developers Notebook]) or one of the books on AspectJ such as "Eclipse AspectJ" by Colyer et. al. or "AspectJ in Action" by Ramnivas Laddad. @@ -596,7 +596,7 @@ method that takes no parameters, whereas `(..)` matches any number of parameters or more). The pattern `({asterisk})` matches a method taking one parameter of any type, `(*,String)` matches a method taking two parameters, the first can be of any type, 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. Some examples of common pointcut expressions are given below. @@ -2013,8 +2013,8 @@ above 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"> @@ -2332,7 +2332,7 @@ simple method executions (for example, field get or set join points, and so on). When using AspectJ, you have the choice of the AspectJ language syntax (also known as the "code style") or the @AspectJ annotation style. Clearly, if you are not using Java 5+ then 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, then the AspectJ language syntax is the preferred option: it is cleaner and simpler because the language was purposefully designed for writing aspects. If you are not using Eclipse, or have only a few aspects @@ -2742,7 +2742,7 @@ using Spring in accordance with the properties of the annotation". In this conte __initialization__ refers to newly instantiated objects (e.g., objects instantiated with the '++new++' operator) as well as to `Serializable` objects that are undergoing deserialization (e.g., via -http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html[readResolve()]). +https://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html[readResolve()]). [NOTE] ==== @@ -2763,14 +2763,14 @@ available for use in the body of the constructors, then you need to define this You can find out 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 <>). The `AnnotationBeanConfigurerAspect` itself needs configuring by Spring (in order to obtain a reference to the bean factory that is to be used to configure new objects). If you are @@ -2989,7 +2989,7 @@ The focus of this section is on configuring and using LTW in the specific contex Spring Framework: this section is not an introduction to LTW though. For full details on the specifics of LTW and configuring LTW with just 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-add that the Spring Framework brings to AspectJ LTW is in enabling much @@ -3075,7 +3075,7 @@ namely the presence of a file (or files) on the Java classpath called [source,xml,indent=0] [subs="verbatim,quotes"] ---- - + @@ -3107,9 +3107,9 @@ are some more options that you can specify, but these are detailed later). 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"> + https://www.springframework.org/schema/context/spring-context.xsd"> @@ -3334,19 +3334,19 @@ environment (summarized in the following table). | Runtime Environment| `LoadTimeWeaver` implementation | 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` -| Running in Oracle's http://glassfish.dev.java.net/[GlassFish] +| Running in Oracle's https://glassfish.dev.java.net/[GlassFish] | `GlassFishLoadTimeWeaver` -| Running in http://tomcat.apache.org/[Apache Tomcat] +| Running in https://tomcat.apache.org/[Apache Tomcat] | `TomcatLoadTimeWeaver` -| 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` | JVM started with Spring `InstrumentationSavingAgent` __(java @@ -3354,7 +3354,7 @@ environment (summarized in the following table). | `InstrumentationLoadTimeWeaver` | Fallback, expecting the underlying ClassLoader to follow common conventions (e.g. - applicable to `TomcatInstrumentableClassLoader` and http://www.caucho.com/[Resin]) + applicable to `TomcatInstrumentableClassLoader` and https://www.caucho.com/[Resin]) | `ReflectiveLoadTimeWeaver` |=== @@ -3392,9 +3392,9 @@ element: 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"> @@ -3445,7 +3445,7 @@ containers. [[aop-aj-ltw-environment-tomcat]] ===== Tomcat -Historically, http://tomcat.apache.org/[Apache Tomcat]'s default class loader did not +Historically, https://tomcat.apache.org/[Apache Tomcat]'s default class loader did not support class transformation which is why Spring provides an enhanced implementation that addresses this need. Named `TomcatInstrumentableClassLoader`, the loader works on Tomcat 6.0 and above. @@ -3486,7 +3486,7 @@ Apache Tomcat (6.0+) supports several context locations: For efficiency, the embedded per-web-app configuration style is recommended because it will impact only applications that use the custom class loader and does not require any changes to the server configuration. See the Tomcat 6.0.x -http://tomcat.apache.org/tomcat-6.0-doc/config/context.html[documentation] for more +https://tomcat.apache.org/tomcat-6.0-doc/config/context.html[documentation] for more details about available context locations. Alternatively, consider the use of the Spring-provided generic VM agent, to be specified @@ -3538,7 +3538,7 @@ using this in application server environments (depending on your operation polic Additionally, the JDK agent will instrument the __entire__ VM which can prove expensive. For performance reasons, it is recommended to use this configuration only if your target -environment (such as http://www.eclipse.org/jetty/[Jetty]) does not have (or does not +environment (such as https://www.eclipse.org/jetty/[Jetty]) does not have (or does not support) a dedicated LTW. @@ -3546,7 +3546,7 @@ support) a dedicated LTW. [[aop-resources]] == Further Resources -More information on AspectJ can be found on the http://www.eclipse.org/aspectj[AspectJ +More information on AspectJ can be found on the https://www.eclipse.org/aspectj[AspectJ website]. The book __Eclipse AspectJ__ by Adrian Colyer et. al. (Addison-Wesley, 2005) provides a diff --git a/src/asciidoc/core-beans.adoc b/src/asciidoc/core-beans.adoc index 43ec4b5bbc9..a4488a24764 100644 --- a/src/asciidoc/core-beans.adoc +++ b/src/asciidoc/core-beans.adoc @@ -134,7 +134,7 @@ The following example shows the basic structure of XML-based configuration metad + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -190,7 +190,7 @@ The following example shows the service layer objects `(services.xml)` configura + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -214,7 +214,7 @@ The following example shows the data access objects `daos.xml` file: + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -885,7 +885,7 @@ You can also use the constructor parameter name for value disambiguation: 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 can't compile your code with debug flag (or don't want to) you can use -http://download.oracle.com/javase/6/docs/api/java/beans/ConstructorProperties.html[@ConstructorProperties] +https://download.oracle.com/javase/6/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: @@ -1231,7 +1231,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"> + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -1684,7 +1684,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"> @@ -1736,7 +1736,7 @@ Let's review the examples from <> with the `c:` nam 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"> @@ -2663,9 +2663,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"> @@ -2898,9 +2898,9 @@ of the scope. You can also do the `Scope` registration declaratively, using the 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"> @@ -3776,9 +3776,9 @@ Find below the custom `BeanPostProcessor` implementation class definition: 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"> @@ -4159,9 +4159,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"> @@ -4482,9 +4482,9 @@ The corresponding bean definitions appear as follows. 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"> @@ -4560,9 +4560,9 @@ The corresponding bean definitions appear as follows. The bean with qualifier va 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"> @@ -4674,9 +4674,9 @@ demonstrated in 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"> @@ -4817,9 +4817,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"> @@ -5256,9 +5256,9 @@ The following is an alternative using 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"> @@ -5280,7 +5280,7 @@ entries in the classpath. When you build JARs with Ant, make sure that you do __ activate the files-only switch of the JAR task. Also, classpath directories may not get exposed based on security policies in some environments, e.g. 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). ==== Furthermore, the `AutowiredAnnotationBeanPostProcessor` and @@ -5716,7 +5716,7 @@ annotations. You just need to have the relevant jars in your classpath. ==== If you are using 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] @@ -5898,7 +5898,7 @@ features are not available as shown in the table below: 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 @@ -8132,9 +8132,9 @@ notify appropriate parties. 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. ==== diff --git a/src/asciidoc/core-resources.adoc b/src/asciidoc/core-resources.adoc index 0646c82fa73..6dd0fb1f625 100644 --- a/src/asciidoc/core-resources.adoc +++ b/src/asciidoc/core-resources.adoc @@ -250,7 +250,7 @@ Similarly, one can force a `UrlResource` to be used by specifying any of the sta [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``s to ``Resource``s: @@ -270,7 +270,7 @@ The following table summarizes the strategy for converting ``String``s to ``Reso pass:specialcharacters,macros[<>].] | http: -| `http://myserver/logo.png` +| `https://myserver/logo.png` | Loaded as a `URL`. | (none) diff --git a/src/asciidoc/core-validation.adoc b/src/asciidoc/core-validation.adoc index 76dd177cf6e..3af08c9f799 100644 --- a/src/asciidoc/core-validation.adoc +++ b/src/asciidoc/core-validation.adoc @@ -207,7 +207,7 @@ Oracle. A JavaBean is simply a class with a default no-argument constructor, whi a naming convention where (by way of an example) a property named `bingoMadness` would have a setter method `setBingoMadness(..)` and a getter method `getBingoMadness()`. For more information about JavaBeans and the specification, please refer to Oracle's website ( -http://docs.oracle.com/javase/6/docs/api/java/beans/package-summary.html[javabeans]). +https://docs.oracle.com/javase/6/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 javadocs, the @@ -461,7 +461,7 @@ com Note that you can also use the standard `BeanInfo` JavaBeans mechanism here as well (described -http://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html[in +https://docs.oracle.com/javase/tutorial/javabeans/advanced/customization.html[in not-amazing-detail here]). Find below an example of using the `BeanInfo` mechanism for explicitly registering one or more `PropertyEditor` instances with the properties of an associated class. @@ -1366,7 +1366,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> @@ -1454,7 +1454,7 @@ JSR-303 allows you to define declarative validation constraints against such pro When an instance of this class is validated by a JSR-303 Validator, these constraints will be enforced. -For general information on JSR-303/JSR-349, see the http://beanvalidation.org/[Bean +For general information on JSR-303/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 setup a Bean Validation provider as a Spring diff --git a/src/asciidoc/data-access.adoc b/src/asciidoc/data-access.adoc index 0cef793963d..0d11490ab08 100644 --- a/src/asciidoc/data-access.adoc +++ b/src/asciidoc/data-access.adoc @@ -136,7 +136,7 @@ Typically you need an application server's JTA capability only if your applicati 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. Standalone 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). @@ -288,9 +288,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"> @@ -632,11 +632,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"> @@ -897,11 +897,11 @@ the default transactional configuration, you would 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"> @@ -945,11 +945,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"> @@ -1106,11 +1106,11 @@ can be made transactional by adding merely __one__ line of XML configuration: 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"> @@ -1568,11 +1568,11 @@ is controlled through the `Ordered` interface. For full details on advice orderi 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"> @@ -1624,11 +1624,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"> @@ -1724,7 +1724,7 @@ annotated, 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 <> for a discussion of load-time weaving with AspectJ. @@ -2040,12 +2040,12 @@ treats them as errors. === Further Resources For more information about the Spring Framework's transaction support: -* 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. @@ -2546,9 +2546,9 @@ The corresponding configuration might look like this. 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"> @@ -2599,9 +2599,9 @@ The corresponding XML configuration file would look like the following: 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"> @@ -2704,7 +2704,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. @@ -4595,7 +4595,7 @@ it with values from the Java `ARRAY`. === Embedded database support 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. @@ -4995,7 +4995,7 @@ Benefits of using the Spring Framework to create your ORM DAOs include: ==== 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. ==== @@ -5102,7 +5102,7 @@ exception hierarchies. [[orm-hibernate]] === Hibernate -We will start with a coverage of http://www.hibernate.org/[Hibernate 5] in a Spring +We will 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 O/R mappers. This section will cover many issues in detail and show different variations of DAO implementations and transaction demarcation. Most of these patterns can be @@ -5284,11 +5284,11 @@ XML, for a simple service class: 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"> @@ -5386,11 +5386,11 @@ provide is the TransactionManager implementation and a "" 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"> @@ -5922,11 +5922,11 @@ declarative transaction facilities. For example: 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"> @@ -5996,7 +5996,7 @@ within Spring's JDO support. === JPA 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 similar manner to the integration with Hibernate or JDO, while being aware of the underlying implementation in order to provide additional features. @@ -6165,7 +6165,7 @@ The `LoadTimeWeaver` interface is a Spring-provided class that allows JPA `ClassTransformer` instances to be plugged in a specific manner, depending 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] typically is 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. @@ -6420,11 +6420,11 @@ declarative transaction facilities. For example: 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"> @@ -6784,7 +6784,7 @@ preamble of the XML configuration file. Note the 'oxm' related text below: + **xmlns:oxm="http://www.springframework.org/schema/oxm"** xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd **http://www.springframework.org/schema/oxm https://www.springframework.org/schema/oxm/spring-oxm.xsd"**> ---- Currently, the following tags are available: @@ -6897,7 +6897,7 @@ not require any further configuration, though a mapping file can be used to have control over the behavior of Castor. For more information on Castor, refer to the -http://castor-data-binding.github.io/castor[__Castor web site__]. The Spring +https://castor-data-binding.github.io/castor[__Castor web site__]. The Spring integration classes reside in the `org.springframework.oxm.castor` package. @@ -6922,7 +6922,7 @@ interface. It can be wired up as follows: ==== Mapping Although it is possible to rely on Castor's default marshalling behavior, it might be necessary to have more control over it. This can be accomplished using a Castor mapping -file. For more information, refer to http://castor-data-binding.github.io/castor/reference-guides/1.3.3/html-single/index.html#xml.mapping[Castor +file. For more information, refer to https://castor-data-binding.github.io/castor/reference-guides/1.3.3/html-single/index.html#xml.mapping[Castor XML Mapping]. The mapping can be set using the `mappingLocation` resource property, indicated below @@ -6995,7 +6995,7 @@ Infoset fidelity. It takes a different approach to that of most other O/X mappin frameworks, in that all classes that are generated from an XML Schema are all derived from `XmlObject`, and contain XML binding information in them. -For more information on XMLBeans, refer to the http://xmlbeans.apache.org/[__XMLBeans +For more information on XMLBeans, refer to the https://xmlbeans.apache.org/[__XMLBeans web site __]. The Spring-WS integration classes reside in the `org.springframework.oxm.xmlbeans` package. @@ -7127,7 +7127,7 @@ Available attributes are: 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, refer to the http://x-stream.github.io/[__XStream +For more information on XStream, refer to the https://x-stream.github.io/[__XStream web site__]. The Spring integration classes reside in the `org.springframework.oxm.xstream` package. diff --git a/src/asciidoc/images/overview-ejb.graffle b/src/asciidoc/images/overview-ejb.graffle index 3813752a400..8675627fe34 100644 --- a/src/asciidoc/images/overview-ejb.graffle +++ b/src/asciidoc/images/overview-ejb.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/images/overview-full.graffle b/src/asciidoc/images/overview-full.graffle index b77b5cc11cf..4c617b771ae 100644 --- a/src/asciidoc/images/overview-full.graffle +++ b/src/asciidoc/images/overview-full.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/images/overview-remoting.graffle b/src/asciidoc/images/overview-remoting.graffle index 029ffe2268e..de0e0e8726c 100644 --- a/src/asciidoc/images/overview-remoting.graffle +++ b/src/asciidoc/images/overview-remoting.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/images/overview-thirdparty-web.graffle b/src/asciidoc/images/overview-thirdparty-web.graffle index 6a1d4278a87..d78f722e0cb 100644 --- a/src/asciidoc/images/overview-thirdparty-web.graffle +++ b/src/asciidoc/images/overview-thirdparty-web.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/images/oxm-exceptions.graffle b/src/asciidoc/images/oxm-exceptions.graffle index 7e1c19f1dff..4b72bf45285 100644 --- a/src/asciidoc/images/oxm-exceptions.graffle +++ b/src/asciidoc/images/oxm-exceptions.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/images/spring-overview.graffle b/src/asciidoc/images/spring-overview.graffle index 3dcbe41270b..1e0774681a7 100644 --- a/src/asciidoc/images/spring-overview.graffle +++ b/src/asciidoc/images/spring-overview.graffle @@ -1,5 +1,5 @@ - + ActiveLayerIndex diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 8beda61e8c1..128077a6c5e 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -1,7 +1,7 @@ = Spring Framework Reference Documentation Rod Johnson; Juergen Hoeller; Keith Donald; Colin Sampaleanu; Rob Harrop; Thomas Risberg; Alef Arendsen; Darren Davison; Dmitriy Kopylenko; Mark Pollack; Thierry Templier; Erwin Vervaet; Portia Tung; Ben Hale; Adrian Colyer; John Lewis; Costin Leau; Mark Fisher; Sam Brannen; Ramnivas Laddad; Arjen Poutsma; Chris Beams; Tareq Abedrabbo; Andy Clement; Dave Syer; Oliver Gierke; Rossen Stoyanchev; Phillip Webb; Rob Winch; Brian Clozel; Stephane Nicoll; Sebastien Deleuze -:doc-root: http://docs.spring.io +:doc-root: https://docs.spring.io :api-spring-framework: {doc-root}/spring-framework/docs/{spring-version}/javadoc-api/org/springframework :wiki-spring-framework: https://github.com/spring-projects/spring-framework/wiki diff --git a/src/asciidoc/integration.adoc b/src/asciidoc/integration.adoc index 358210520c6..24518995900 100644 --- a/src/asciidoc/integration.adoc +++ b/src/asciidoc/integration.adoc @@ -209,7 +209,7 @@ will transparently create an invoker and remotely enable the account service thr [[remoting-caucho-protocols]] === Using Hessian or Burlap to remotely call services via HTTP Hessian offers a binary HTTP-based remoting protocol. It is developed by Caucho and more -information about Hessian itself can be found at http://www.caucho.com[]. +information about Hessian itself can be found at https://www.caucho.com/[]. @@ -367,7 +367,7 @@ this application context. ==== Of course, this example doesn't 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/[]. ==== @@ -385,7 +385,7 @@ when choosing a remoting technology). Under the hood, Spring uses either the standard facilities provided by the JDK or Apache `HttpComponents` to perform HTTP calls. Use the latter if you need more advanced and easier-to-use functionality. Refer to -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. @@ -765,7 +765,7 @@ the client and server. + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -792,7 +792,7 @@ On the server, you just need to expose the service object using the + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -844,7 +844,7 @@ proxy will take care of forwarding the call to the server-side object via JMS. + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -973,7 +973,7 @@ shown below. [source,java,indent=0] [subs="verbatim,quotes"] ---- - String uri = "http://example.com/hotels/1/bookings"; + String uri = "https://example.com/hotels/1/bookings"; PostMethod post = new PostMethod(uri); String request = // create booking request content @@ -1070,7 +1070,7 @@ variable-length argument or a `Map`. For example, [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"); ---- using variable-length arguments and @@ -1080,7 +1080,7 @@ using variable-length arguments and ---- Map 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); ---- using a `Map`. @@ -1107,7 +1107,7 @@ the `RestTemplate` is shown below [source,java,indent=0] [subs="verbatim,quotes"] ---- - uri = "http://example.com/hotels/{id}/bookings"; + uri = "https://example.com/hotels/{id}/bookings"; RestTemplate template = new RestTemplate(); @@ -1180,12 +1180,12 @@ to be encoded. For example the following: [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); ---- -will perform a GET on `http://example.com/hotel%20list`. That means if the input URL +will perform a GET on `https://example.com/hotel%20list`. That means if the input URL String is already encoded, it will be encoded twice -- i.e. -`http://example.com/hotel%20list` will become `http://example.com/hotel%2520list`. If +`https://example.com/hotel%20list` will become `https://example.com/hotel%2520list`. If this is not the intended effect, use the `java.net.URI` method variant, which assumes the URL is already encoded is also generally useful if you want to reuse a single (fully expanded) `URI` multiple times. @@ -1197,7 +1197,7 @@ support for URI templates. For example you can start with a URL String: [subs="verbatim,quotes"] ---- UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com/hotels/{hotel}/bookings/{booking}").build() + "https://example.com/hotels/{hotel}/bookings/{booking}").build() .expand("42", "21") .encode(); @@ -1235,7 +1235,7 @@ read response headers. For example: HttpEntity requestEntity = new HttpEntity(requestHeaders); HttpEntity response = template.exchange( - "http://example.com/hotels/{hotel}", + "https://example.com/hotels/{hotel}", HttpMethod.GET, requestEntity, String.class, "42"); String responseHeader = response.getHeaders().getFirst("MyResponseHeader"); @@ -1249,7 +1249,7 @@ and body. [[rest-template-jsonview]] ===== Jackson JSON Views support -It is possible to specify a http://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON View] +It is possible to specify a https://wiki.fasterxml.com/JacksonJsonViews[Jackson JSON View] to serialize only a subset of the object properties. For example: [source,java,indent=0] @@ -1258,7 +1258,7 @@ to serialize only a subset of the object properties. For example: MappingJacksonValue value = new MappingJacksonValue(new User("eric", "7!jd#h23")); value.setSerializationView(User.WithoutPasswordView.class); HttpEntity entity = new HttpEntity(value); - String s = template.postForObject("http://example.com/user", entity, String.class); + String s = template.postForObject("https://example.com/user", entity, String.class); ---- @@ -1388,7 +1388,7 @@ The previous `RestTemplate` example translates to: ---- // async call Future> futureEntity = template.getForEntity( - "http://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21"); + "https://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21"); // get the concrete result - synchronous call ResponseEntity entity = futureEntity.get(); @@ -1401,7 +1401,7 @@ accepts completion callbacks: [subs="verbatim,quotes"] ---- ListenableFuture> futureEntity = template.getForEntity( - "http://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21"); + "https://example.com/hotels/{hotel}/bookings/{booking}", String.class, "42", "21"); // register a callback futureEntity.addCallback(new ListenableFutureCallback>() { @@ -2859,8 +2859,8 @@ namespace elements you will need to reference the JMS schema: 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**"> @@ -4566,11 +4566,11 @@ you can accept the coupling to both Spring and JMX, then do so. === Further Resources 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] (an Open Source implementation of various JMX specs) @@ -6060,7 +6060,7 @@ using the Velocity template library to create email content. [[mail-templates-example]] ===== A Velocity-based example -To use http://velocity.apache.org[Velocity] to create your email template(s), you will +To use https://velocity.apache.org[Velocity] to create your email template(s), you will need to have the Velocity libraries available on your classpath. You will also need to create one or more Velocity templates for the email content that your application needs. Find below the Velocity template that this example will be using. As you can see it is @@ -6146,7 +6146,7 @@ Velocity template to create email content and send email(s). + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -6187,7 +6187,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 for supporting 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/[]). Both of those schedulers are set up 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 allows you to invoke a method of @@ -6781,7 +6781,7 @@ As you can see from that configuration, a 'queue-capacity' value has also been p The configuration of the thread pool should also be considered in light of the executor's queue capacity. For the full description of the relationship between pool size and queue capacity, consult the documentation for -http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html[ThreadPoolExecutor]. +https://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html[ThreadPoolExecutor]. The main idea is that when a task is submitted, the executor will first try to use a free thread if the number of active threads is currently less than the core size. If the core size has been reached, then the task will be added to the queue as long as its @@ -6891,7 +6891,7 @@ provided instead. Here is an example demonstrating these other options. === Using the Quartz Scheduler Quartz uses `Trigger`, `Job` and `JobDetail` objects to realize scheduling of all kinds of jobs. For the basic concepts behind Quartz, have a look at -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 the usage of Quartz within Spring-based applications. @@ -7207,8 +7207,8 @@ For more information on schema-based configuration, see <>. + 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"> @@ -8089,8 +8089,8 @@ a <>. + 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"> @@ -8114,7 +8114,7 @@ in the Spring Framework. Find below links to further resources about the various dynamic languages described in this chapter. -* The http://jruby.org/[JRuby] homepage +* The https://www.jruby.org[JRuby] homepage * The http://www.groovy-lang.org/[Groovy] homepage * The http://www.beanshell.org/[BeanShell] homepage @@ -8154,7 +8154,7 @@ caching occurs.It as well improves performance but does that by allowing the sam to be read multiple times in a fast fashion. A further explanation of the differences between two can be found -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 abstraction applies caching to Java methods, reducing thus the number @@ -8189,7 +8189,7 @@ materialized by the `org.springframework.cache.Cache` and There are <> of that abstraction available out of the box: JDK `java.util.concurrent.ConcurrentMap` based caches, -http://ehcache.org/[EhCache], Gemfire cache, +https://www.ehcache.org/[EhCache], Gemfire cache, https://code.google.com/p/guava-libraries/wiki/CachesExplained[Guava caches] and JSR-107 compliant caches. See <> for more information on plugging in other cache stores/providers. @@ -8657,8 +8657,8 @@ Alternatively for XML configuration use the `cache:annotation-driven` element: 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"> @@ -9187,7 +9187,7 @@ Clearly there are plenty of caching products out there that can be used as a bac store. To plug them in, one needs to provide a `CacheManager` and `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[adapter]s that map the caching abstraction +https://en.wikipedia.org/wiki/Adapter_pattern[adapter]s that map the caching abstraction framework on top of the storage API as the `ehcache` classes can show. Most `CacheManager` classes can use the classes in `org.springframework.cache.support` package, such as `AbstractCacheManager` which takes care of the boiler-plate code diff --git a/src/asciidoc/overview.adoc b/src/asciidoc/overview.adoc index 183fec5e74d..b18f2554bfb 100644 --- a/src/asciidoc/overview.adoc +++ b/src/asciidoc/overview.adoc @@ -38,12 +38,12 @@ about the underlying concepts (such as __"Dependency Injection"__) that Spring h embraced. 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 application. +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] like the https://spring.io/guides/gs/rest-service/[Getting Started Building a RESTful Web Service] one. As well as being easier to digest, these guides are very __task focused__, and most of @@ -101,7 +101,7 @@ robust, __maintainable__ applications. **** "__The question is, what aspect of control are [they] inverting?__" Martin Fowler posed this question about Inversion of Control (IoC) -http://martinfowler.com/articles/injection.html[on his site] in 2004. Fowler suggested +https://martinfowler.com/articles/injection.html[on his site] in 2004. Fowler suggested renaming the principle to make it more self-explanatory and came up with __Dependency Injection__. **** @@ -445,7 +445,7 @@ building, and our samples mostly use Gradle or Maven. [[overview-maven-dependency-management]] ===== Maven Dependency Management -If you are using http://maven.apache.org/[Maven] for dependency management you don't even +If you are using https://maven.apache.org/[Maven] for dependency management you don't even need to supply the logging dependency explicitly. For example, to create an application context and use dependency injection to configure an application, your Maven dependencies will look like this: @@ -477,7 +477,7 @@ repository location in your Maven configuration. For full releases: io.spring.repo.maven.release - http://repo.spring.io/release/ + https://repo.spring.io/release/ false @@ -491,7 +491,7 @@ For milestones: io.spring.repo.maven.milestone - http://repo.spring.io/milestone/ + https://repo.spring.io/milestone/ false @@ -505,7 +505,7 @@ And for snapshots: io.spring.repo.maven.snapshot - http://repo.spring.io/snapshot/ + https://repo.spring.io/snapshot/ true @@ -561,7 +561,7 @@ attribute when depending on Spring Framework artifacts: [[overview-gradle-dependency-management]] ===== Gradle Dependency Management -To use the Spring repository with the http://www.gradle.org/[Gradle] build system, +To use the Spring repository with the https://www.gradle.org/[Gradle] build system, include the appropriate URL in the `repositories` section: [source,groovy,indent=0] @@ -570,7 +570,7 @@ include the appropriate URL in the `repositories` section: repositories { mavenCentral() // and optionally... - maven { url "http://repo.spring.io/release" } + maven { url "https://repo.spring.io/release" } } ---- @@ -590,7 +590,7 @@ usual Gradle way: [[overview-ivy-dependency-management]] ===== Ivy Dependency Management -If you prefer to use http://ant.apache.org/ivy[Ivy] to manage dependencies then there +If you prefer to use https://ant.apache.org/ivy[Ivy] to manage dependencies then there are similar configuration options. To configure Ivy to point to the Spring repository add the following resolver to your @@ -602,7 +602,7 @@ To configure Ivy to point to the Spring repository add the following resolver to + root="https://repo.spring.io/release/"/> ---- @@ -629,11 +629,11 @@ Distribution zips are published to the Spring Maven Repository (this is just for convenience, you don't need Maven or any other build system in order to download them). To download a distribution zip open a web browser to -http://repo.spring.io/release/org/springframework/spring and select the appropriate +https://repo.spring.io/release/org/springframework/spring and select the appropriate subfolder for the version that you want. Distribution files end `-dist.zip`, for example +spring-framework-{spring-version}-RELEASE-dist.zip+. Distributions are also published -for http://repo.spring.io/milestone/org/springframework/spring[milestones] and -http://repo.spring.io/snapshot/org/springframework/spring[snapshots]. +for https://repo.spring.io/milestone/org/springframework/spring[milestones] and +https://repo.spring.io/snapshot/org/springframework/spring[snapshots]. @@ -672,7 +672,7 @@ of the box in most situations, and that's important. Unfortunately, the runtime discovery algorithm in `commons-logging`, while convenient for the end-user, is problematic. If we could turn back the clock and start Spring now as a new project it would use a different logging dependency. The first choice would -probably be the Simple Logging Facade for Java ( http://www.slf4j.org[SLF4J]), which is +probably be the Simple Logging Facade for Java ( https://www.slf4j.org[SLF4J]), which is also used by a lot of other tools that people use with Spring inside their applications. There are basically two ways to switch off `commons-logging`: @@ -681,7 +681,7 @@ There are basically two ways to switch off `commons-logging`: explicitly depends on `commons-logging`) . Depend on a special `commons-logging` dependency that replaces the library with an empty jar (more details can be found in the - http://slf4j.org/faq.html#excludingJCL[SLF4J FAQ]) + https://www.slf4j.org/faq.html#excludingJCL[SLF4J FAQ]) To exclude commons-logging, add the following to your `dependencyManagement` section: @@ -774,7 +774,7 @@ platform. Allegedly there is also a performance benefit because the bindings are compile-time not runtime. A more common choice amongst SLF4J users, which uses fewer steps and generates fewer -dependencies, is to bind directly to http://logback.qos.ch[Logback]. This removes the +dependencies, is to bind directly to https://logback.qos.ch[Logback]. This removes the extra binding step because Logback implements SLF4J directly, so you only need to depend on two libraries not four ( `jcl-over-slf4j` and `logback`). If you do that you might also need to exclude the slf4j-api dependency from other external dependencies (not @@ -783,7 +783,7 @@ Spring), because you only want one version of that API on the classpath. [[overview-logging-log4j]] ===== Using Log4J -Many people use http://logging.apache.org/log4j[Log4j] as a logging framework for +Many people use https://logging.apache.org/log4j[Log4j] as a logging framework for configuration and management purposes. It's efficient and well-established, and in fact it's what we use at runtime when we build and test Spring. Spring also provides some utilities for configuring and initializing Log4j, so it has an optional compile-time diff --git a/src/asciidoc/testing.adoc b/src/asciidoc/testing.adoc index 3ef4ba77ab8..d22c55b64e5 100644 --- a/src/asciidoc/testing.adoc +++ b/src/asciidoc/testing.adoc @@ -74,7 +74,7 @@ configuration in testing scenarios without modification. The `org.springframework.mock.web` package contains a comprehensive set of Servlet API mock objects, which 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] or +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]. As of Spring Framework 4.0, the set of mocks in the `org.springframework.mock.web` package is based on the Servlet 3.0 API. @@ -2574,7 +2574,7 @@ test suite. This can be achieved by executing all tests as a group within an IDE Similarly, 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 will not be able to cache application contexts between test classes and the build process will run significantly slower as a result. @@ -2866,7 +2866,7 @@ this: + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -4249,7 +4249,7 @@ http://htmlunit.sourceforge.net/[HtmlUnit]. This simplifies performing end-to-en when using HTML based views. This integration enables developers to: * Easily test HTML pages using tools such as http://htmlunit.sourceforge.net/[HtmlUnit], -http://seleniumhq.org/projects/webdriver/[WebDriver], & +https://www.seleniumhq.org[WebDriver], & http://www.gebish.org/manual/current/testing.html#spock_junit__testng[Geb] without the need to deploy to a Servlet container * Test JavaScript within pages @@ -4479,7 +4479,7 @@ HtmlPage newMessagePage = submit.click(); ---- 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] ---- @@ -4580,7 +4580,7 @@ For additional information on creating a `MockMvc` instance refer to In the previous sections, we have seen how to use `MockMvc` in conjunction with the raw HtmlUnit APIs. In this section, we will leverage 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? @@ -4591,7 +4591,7 @@ To better understand, let's explore an example. [NOTE] ==== -Despite being a part of http://docs.seleniumhq.org/[Selenium], WebDriver does not require +Despite being a part of https://docs.seleniumhq.org/[Selenium], WebDriver does not require a Selenium Server to run your tests. ==== @@ -4777,7 +4777,7 @@ parts of the HTML page that we are interested in. These are of type `WebElement` ``WebDriver``'s https://code.google.com/p/selenium/wiki/PageFactory[PageFactory] allows us to remove a lot of code from the HtmlUnit version of `CreateMessagePage` by automatically resolving each `WebElement`. The -http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/PageFactory.html#initElements-org.openqa.selenium.WebDriver-java.lang.Class-[PageFactory#initElements(WebDriver,Class)] +https://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/PageFactory.html#initElements-org.openqa.selenium.WebDriver-java.lang.Class-[PageFactory#initElements(WebDriver,Class)] method will automatically resolve each `WebElement` by using the field name and looking it up by the `id` or `name` of the element within the HTML page. @@ -5188,21 +5188,21 @@ PetClinic application for an example. == Further Resources Consult 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, etc. -* 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, etc. -* 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) targeted for database-driven projects that, among other things, puts your diff --git a/src/asciidoc/web-cors.adoc b/src/asciidoc/web-cors.adoc index 5e8c351ce03..59c6be97860 100644 --- a/src/asciidoc/web-cors.adoc +++ b/src/asciidoc/web-cors.adoc @@ -9,9 +9,9 @@ could have the evil.com website open in another tab. The scripts from evil.com s be able to make AJAX requests to your bank API (e.g., withdrawing money from your account!) using your credentials. -http://en.wikipedia.org/wiki/Cross-origin_resource_sharing[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 allows you to specify in a flexible +https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing] +(CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by +https://caniuse.com/#feat=cors[most browsers] that allows you to specify in a flexible way what kind of cross domain requests are authorized, instead of using some less secured and less powerful hacks like IFRAME or JSONP. @@ -64,7 +64,7 @@ It is also possible to enable CORS for the whole controller: [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 { @@ -96,7 +96,7 @@ then combine attributes from both annotations to create merged CORS configuratio @RequestMapping("/account") public class AccountController { - @CrossOrigin("http://domain2.com") + @CrossOrigin("https://domain2.com") @RequestMapping("/{id}") public Account retrieve(@PathVariable Long id) { // ... @@ -147,7 +147,7 @@ public class WebConfig extends WebMvcConfigurerAdapter { @Override 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") @@ -177,14 +177,14 @@ It is also possible to declare several CORS mappings with customized properties: + allowed-origins="https://domain1.com" /> ---- diff --git a/src/asciidoc/web-integration.adoc b/src/asciidoc/web-integration.adoc index 1e91c268704..bd2a3b217e4 100644 --- a/src/asciidoc/web-integration.adoc +++ b/src/asciidoc/web-integration.adoc @@ -21,11 +21,11 @@ in different situations, and as such is ideal for building web application modul guide the user through controlled navigations that drive business processes. For more information about SWF, consult the -http://projects.spring.io/spring-webflow/[Spring Web Flow website]. +https://projects.spring.io/spring-webflow/[Spring Web Flow website]. **** This chapter details Spring's integration with third party web frameworks, such as -http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html[JSF]. +https://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html[JSF]. One of the core value propositions of the Spring Framework is that of enabling __choice__. In a general sense, Spring does not force one to use or buy into any @@ -153,8 +153,8 @@ JavaServer Faces (JSF) is the JCP's standard component-based, event-driven web u interface framework. As of Java EE 5, it is an official part of the Java EE umbrella. For a popular JSF runtime as well as for popular JSF component libraries, check out the -http://myfaces.apache.org/[Apache MyFaces project]. The MyFaces project also provides -common JSF extensions such as http://myfaces.apache.org/orchestra/[MyFaces Orchestra]: +https://myfaces.apache.org/[Apache MyFaces project]. The MyFaces project also provides +common JSF extensions such as https://myfaces.apache.org/orchestra/[MyFaces Orchestra]: a Spring-based JSF extension that provides rich conversation scope support. [NOTE] @@ -162,7 +162,7 @@ a Spring-based JSF extension that provides rich conversation scope support. Spring Web Flow 2.0 provides rich JSF support through its newly established Spring Faces module, both for JSF-centric usage (as described in this section) and for Spring-centric usage (using JSF views within a Spring MVC dispatcher). Check out the -http://projects.spring.io/spring-webflow[Spring Web Flow website] for details! +https://projects.spring.io/spring-webflow[Spring Web Flow website] for details! ==== The key element in Spring's JSF integration is the JSF `ELResolver` mechanism. @@ -208,7 +208,7 @@ takes a `FacesContext` parameter rather than a `ServletContext` parameter. [[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 @@ -223,7 +223,7 @@ built-in Spring integration shipped with Struts. [[tapestry]] == Tapestry 5.x -From the http://tapestry.apache.org/[Tapestry homepage]: +From the https://tapestry.apache.org/[Tapestry homepage]: Tapestry is a "__Component oriented framework for creating dynamic, robust, highly scalable web applications in Java.__" @@ -243,7 +243,7 @@ Spring]. Find below links 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 diff --git a/src/asciidoc/web-mvc.adoc b/src/asciidoc/web-mvc.adoc index 63ccc4d141c..b75f6e5b6bc 100644 --- a/src/asciidoc/web-mvc.adoc +++ b/src/asciidoc/web-mvc.adoc @@ -73,7 +73,7 @@ in different situations, and as such is ideal for building web application modul guide the user through controlled navigations that drive business processes. For more information about SWF, consult the -http://projects.spring.io/spring-webflow/[Spring Web Flow website]. +https://projects.spring.io/spring-webflow/[Spring Web Flow website]. **** Spring's web module includes many unique web support features: @@ -516,9 +516,9 @@ snippet: 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"> @@ -688,10 +688,10 @@ __URI templates__ can be used for convenient access to selected parts of a URL i A URI Template is a URI-like string, containing one or more variable names. When you substitute values for these variables, the template becomes a URI. The -http://bitworking.org/projects/URI-Templates/[proposed RFC] for URI Templates defines +https://bitworking.org/projects/URI-Templates/[proposed RFC] for URI Templates defines how a URI is parameterized. For example, the URI Template -`http://www.example.com/users/{userId}` contains the variable __userId__. Assigning the -value __fred__ to the variable yields `http://www.example.com/users/fred`. +`https://www.example.com/users/{userId}` contains the variable __userId__. Assigning the +value __fred__ to the variable yields `https://www.example.com/users/fred`. In Spring MVC you can use the `@PathVariable` annotation on a method argument to bind it to the value of a URI template variable: @@ -900,7 +900,7 @@ for such extensions. See <>. [NOTE] ==== This was originally introduced as part of work for -http://pivotal.io/security/cve-2015-5211[CVE-2015-5211]. +https://pivotal.io/security/cve-2015-5211[CVE-2015-5211]. Below are additional recommendations from the report: * Encode rather than escape JSON responses. This is also an OWASP XSS recommendation. @@ -920,10 +920,10 @@ Below are additional recommendations from the report: [[mvc-ann-matrix-variables]] ==== Matrix Variables -The URI specification http://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] defines +The URI specification https://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] defines the possibility of including name-value pairs within path segments. There is no specific term used in the spec. The general "URI path parameters" could be applied although the -more unique http://www.w3.org/DesignIssues/MatrixURIs.html["Matrix URIs"], originating +more unique https://www.w3.org/DesignIssues/MatrixURIs.html["Matrix URIs"], originating from an old post by Tim Berners-Lee, is also frequently used and fairly well known. Within Spring MVC these are referred to as matrix variables. @@ -1032,9 +1032,9 @@ to `false`. 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"> @@ -2014,7 +2014,7 @@ documentation] for more details. It can sometimes be useful to filter contextually the object that will be serialized to the HTTP response body. In order to provide such capability, Spring MVC has built-in support for -rendering with http://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views]. +rendering with https://wiki.fasterxml.com/JacksonJsonViews[Jackson's Serialization Views]. To use it with an `@ResponseBody` controller method or controller methods that return `ResponseEntity`, simply add the `@JsonView` annotation with a class argument specifying @@ -2090,7 +2090,7 @@ to the model: [[mvc-ann-jsonp]] ==== Jackson JSONP Support -In order to enable http://en.wikipedia.org/wiki/JSONP[JSONP] support for `@ResponseBody` +In order to enable https://en.wikipedia.org/wiki/JSONP[JSONP] support for `@ResponseBody` and `ResponseEntity` methods, declare an `@ControllerAdvice` bean that extends `AbstractJsonpResponseBodyAdvice` as shown below where the constructor argument indicates the JSONP query parameter name(s): @@ -2245,7 +2245,7 @@ which also provides registration methods for timeout and completion. A controller method can use `DeferredResult` and `Callable` to produce its return value asynchronously and that can be used to implement techniques such as -http://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/[long polling] +https://spring.io/blog/2012/05/08/spring-mvc-3-2-preview-techniques-for-real-time-updates/[long polling] where the server can push an event to the client as soon as possible. What if you wanted to push multiple events on a single HTTP response? @@ -2285,7 +2285,7 @@ the response. ==== HTTP Streaming With Server-Sent Events `SseEmitter` is a sub-class of `ResponseBodyEmitter` providing support for -http://www.w3.org/TR/eventsource/[Server-Sent Events]. +https://www.w3.org/TR/eventsource/[Server-Sent Events]. Server-sent events is a just another variation on the same "HTTP Streaming" technique except events pushed from the server are formatted according to the W3C Server-Sent Events specification. @@ -2302,7 +2302,7 @@ falling back to a very wide range of browsers (including Internet Explorer) and also higher-level messaging patterns for interacting with clients through a publish-subscribe model within a more messaging-centric architecture. For further background on this see -http://blog.pivotal.io/pivotal/products/websocket-architecture-in-spring-4-0[the following blog post]. +https://blog.pivotal.io/pivotal/products/websocket-architecture-in-spring-4-0[the following blog post]. [[mvc-ann-async-output-stream]] ==== HTTP Streaming Directly To The OutputStream @@ -2348,7 +2348,7 @@ For applications configured with a `web.xml` be sure to update to version 3.0: ... @@ -2373,7 +2373,7 @@ Below is some example web.xml configuration: 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"> @@ -2547,7 +2547,7 @@ the example below: if (openingTime <= hour && hour < closingTime) { return true; } - response.sendRedirect("http://host.com/outsideOfficeHours.html"); + response.sendRedirect("https://host.com/outsideOfficeHours.html"); return false; } } @@ -2851,7 +2851,7 @@ name will be treated as the redirect URL. The net effect is the same as if the controller had returned a `RedirectView`, but now the controller itself can simply operate in terms of logical view names. A logical view name such as `redirect:/myapp/some/resource` will redirect 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` will redirect to an absolute URL. Note that the controller handler is annotated with the `@ResponseStatus`, the annotation @@ -2885,17 +2885,17 @@ by the client. Two strategies exist for a client to request a representation fro server: * Use a distinct URI for each resource, typically by using a different file extension in - the URI. For example, the URI `http://www.example.com/users/fred.pdf` requests a PDF - representation of the user fred, and `http://www.example.com/users/fred.xml` requests + the URI. For example, the URI `https://www.example.com/users/fred.pdf` requests a PDF + representation of the user fred, and `https://www.example.com/users/fred.xml` requests an XML representation. * Use the same URI for the client to locate the resource, but set the `Accept` HTTP - request header to list the http://en.wikipedia.org/wiki/Internet_media_type[media + request header to list the https://en.wikipedia.org/wiki/Internet_media_type[media types] that it understands. For example, an HTTP request for - `http://www.example.com/users/fred` with an `Accept` header set to `application/pdf` + `https://www.example.com/users/fred` with an `Accept` header set to `application/pdf` requests a PDF representation of the user fred, while - `http://www.example.com/users/fred` with an `Accept` header set to `text/xml` requests + `https://www.example.com/users/fred` with an `Accept` header set to `text/xml` requests an XML representation. This strategy is known as - http://en.wikipedia.org/wiki/Content_negotiation[content negotiation]. + https://en.wikipedia.org/wiki/Content_negotiation[content negotiation]. [NOTE] ==== @@ -3068,7 +3068,7 @@ For example you can expand and encode a URI template string: [subs="verbatim,quotes"] ---- UriComponents uriComponents = UriComponentsBuilder.fromUriString( - "http://example.com/hotels/{hotel}/bookings/{booking}").build(); + "https://example.com/hotels/{hotel}/bookings/{booking}").build(); URI uri = uriComponents.expand("42", "21").encode().toUri(); ---- @@ -3370,7 +3370,7 @@ handler mappings (see <>). It will detect a parameter in the and change the locale. It calls `setLocale()` on the `LocaleResolver` that also exists in the context. The following example shows that calls to all `{asterisk}.view` resources containing a parameter named `siteLanguage` will now change the locale. So, for example, -a request for the following URL, `http://www.sf.net/home.view?siteLanguage=nl` will +a request for the following URL, `https://www.sf.net/home.view?siteLanguage=nl` will change the site language to Dutch. [source,xml,indent=0] @@ -3506,7 +3506,7 @@ request with a simple request parameter. Spring's built-in multipart support handles file uploads in web applications. You enable this multipart support with pluggable `MultipartResolver` objects, defined in the `org.springframework.web.multipart` package. Spring provides one `MultipartResolver` -implementation for use with http://jakarta.apache.org/commons/fileupload[__Commons +implementation for use with https://jakarta.apache.org/commons/fileupload[__Commons FileUpload__] and another for use with Servlet 3.0 multipart request parsing. By default, Spring does no multipart handling, because some developers want to handle @@ -3940,7 +3940,7 @@ or in a JSP: [[mvc-web-security]] == Web Security -The http://projects.spring.io/spring-security/[Spring Security] project provides features +The https://projects.spring.io/spring-security/[Spring Security] project provides features to protect web applications from malicious exploits. Check out the reference documentation in the sections on {doc-spring-security}/htmlsingle/#csrf["CSRF protection"], {doc-spring-security}/htmlsingle/#headers["Security Response Headers"], and also @@ -3952,7 +3952,7 @@ https://github.com/spring-projects/spring-mvc-showcase/commit/361adc124c05a8187b for an example. Another option is to use a framework dedicated to Web Security. -http://hdiv.org/[HDIV] is one such framework and integrates with Spring MVC. +https://hdiv.org/[HDIV] is one such framework and integrates with Spring MVC. @@ -4145,7 +4145,7 @@ with this example: 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"> + https://www.springframework.org/schema/mvc/spring-mvc.xsd"> @@ -4647,8 +4647,8 @@ in order to provide a better default configuration. This builder 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: @@ -4680,7 +4680,7 @@ and override the methods you need: To customize the default configuration of `` check what attributes and sub-elements it supports. You can view the -http://schema.spring.io/mvc/spring-mvc.xsd[Spring MVC XML schema] or use the code +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. @@ -4720,9 +4720,9 @@ To register custom formatters and converters simply supply a `ConversionService` 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"> @@ -4813,9 +4813,9 @@ and 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"> @@ -5423,8 +5423,8 @@ that adds support for accessing parameter names (feature added in Java 8). [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: diff --git a/src/asciidoc/web-portlet.adoc b/src/asciidoc/web-portlet.adoc index 91d75608577..ee4406081f2 100644 --- a/src/asciidoc/web-portlet.adoc +++ b/src/asciidoc/web-portlet.adoc @@ -748,7 +748,7 @@ applications, just like Web MVC does. The design for the multipart support is do pluggable `PortletMultipartResolver` objects, defined in the `org.springframework.web.portlet.multipart` package. Spring provides a `PortletMultipartResolver` for use with -http://jakarta.apache.org/commons/fileupload[Commons FileUpload]. How uploading files is +https://jakarta.apache.org/commons/fileupload[Commons FileUpload]. How uploading files is supported will be described in the rest of this section. By default, no multipart handling will be done by Spring Portlet MVC, as some developers @@ -1049,7 +1049,7 @@ need to make sure that a corresponding custom `DefaultAnnotationHandlerMapping` + https://www.springframework.org/schema/beans/spring-beans.xsd"> @@ -1097,9 +1097,9 @@ schema as shown in the following XML snippet: 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"> diff --git a/src/asciidoc/web-view.adoc b/src/asciidoc/web-view.adoc index a62ed5933d5..2453df20d31 100644 --- a/src/asciidoc/web-view.adoc +++ b/src/asciidoc/web-view.adoc @@ -16,13 +16,13 @@ to the MVC framework. [[view-thymeleaf]] == Thymeleaf -http://www.thymeleaf.org/[Thymeleaf] is a good example of a view technology fitting +https://www.thymeleaf.org/[Thymeleaf] is a good example of a view technology fitting perfectly in the MVC framework. Support for this integration is not provided by the Spring team but by the Thymeleaf team itself. Configuring Thymeleaf for Spring usually requires a few beans defined, like a `ServletContextTemplateResolver`, a `SpringTemplateEngine` and a `ThymeleafViewResolver`. -Please refer to the http://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] +Please refer to the https://www.thymeleaf.org/documentation.html[Thymeleaf+Spring] documentation section for more details. @@ -100,11 +100,11 @@ Here is a sample template for an HTML page: [[view-velocity]] == Velocity & FreeMarker -http://velocity.apache.org[Velocity] and http://www.freemarker.org[FreeMarker] are two +https://velocity.apache.org[Velocity] and https://freemarker.apache.org/[FreeMarker] are two templating languages that can be used as view technologies within Spring MVC applications. The languages are quite similar and serve similar needs and so are considered together in this section. For semantic and syntactic differences between the -two languages, see the http://www.freemarker.org[FreeMarker] web site. +two languages, see the https://freemarker.apache.org/[FreeMarker] web site. @@ -1476,12 +1476,12 @@ and `Invocable` interfaces. It has been tested with: -* http://handlebarsjs.com/[Handlebars] running on http://openjdk.java.net/projects/nashorn/[Nashorn] -* https://mustache.github.io/[Mustache] running on http://openjdk.java.net/projects/nashorn/[Nashorn] -* http://facebook.github.io/react/[React] running on http://openjdk.java.net/projects/nashorn/[Nashorn] -* http://www.embeddedjs.com/[EJS] running on http://openjdk.java.net/projects/nashorn/[Nashorn] -* http://www.stuartellis.eu/articles/erb/[ERB] running on http://jruby.org[JRuby] -* https://docs.python.org/2/library/string.html#template-strings[String templates] running on http://www.jython.org/[Jython] +* https://handlebarsjs.com/[Handlebars] running on https://openjdk.java.net/projects/nashorn/[Nashorn] +* https://mustache.github.io/[Mustache] running on https://openjdk.java.net/projects/nashorn/[Nashorn] +* https://facebook.github.io/react/[React] running on https://openjdk.java.net/projects/nashorn/[Nashorn] +* https://www.embeddedjs.com/[EJS] running on https://openjdk.java.net/projects/nashorn/[Nashorn] +* https://www.stuartellis.name/articles/erb/[ERB] running on https://www.jruby.org[JRuby] +* https://docs.python.org/2/library/string.html#template-strings[String templates] running on https://www.jython.org/[Jython] [[view-script-dependencies]] === Dependencies @@ -1489,17 +1489,17 @@ It has been tested with: To be able to use script templates integration, you need to have available in your classpath the script engine: -* http://openjdk.java.net/projects/nashorn/[Nashorn] Javascript engine is provided builtin with Java 8+. +* https://openjdk.java.net/projects/nashorn/[Nashorn] Javascript engine is provided builtin with Java 8+. Using the latest update release available is highly recommended. -* http://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/#jsengine[Rhino] +* https://docs.oracle.com/javase/7/docs/technotes/guides/scripting/programmer_guide/#jsengine[Rhino] Javascript engine is provided builtin with Java 6 and Java 7. Please notice that using Rhino is not recommended since it does not support running most template engines. -* http://jruby.org[JRuby] dependency should be added in order to get Ruby support. -* http://www.jython.org[Jython] dependency should be added in order to get Python support. +* https://www.jruby.org[JRuby] dependency should be added in order to get Ruby support. +* https://www.jython.org[Jython] dependency should be added in order to get Python support. You should also need to add dependencies for your script based template engine. For example, -for Javascript you can use http://www.webjars.org/[WebJars] to add Maven/Gradle dependencies +for Javascript you can use https://www.webjars.org/[WebJars] to add Maven/Gradle dependencies in order to make your javascript libraries available in the classpath. @@ -1596,9 +1596,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 may 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. [source,java,indent=0] @@ -1693,7 +1693,7 @@ This section focuses on Spring's support for Tiles v3 in the [[view-tiles-dependencies]] === 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. @@ -1701,7 +1701,7 @@ to your project. === How to integrate Tiles To be able to use Tiles, you have to configure it using files containing definitions (for basic information on definitions and other Tiles concepts, please have a look at -http://tiles.apache.org[]). In Spring this is done using the `TilesConfigurer`. Have a +https://tiles.apache.org[]). In Spring this is done using the `TilesConfigurer`. Have a look at the following piece of example ApplicationContext configuration: [source,xml,indent=0] @@ -2603,7 +2603,7 @@ annotations. When further control is needed, a custom `ObjectMapper` can be inje through the `ObjectMapper` property for cases where custom JSON serializers/deserializers need to be provided for specific types. -http://en.wikipedia.org/wiki/JSONP[JSONP] is supported and automatically enabled when +https://en.wikipedia.org/wiki/JSONP[JSONP] is supported and automatically enabled when the request has a query parameter named `jsonp` or `callback`. The JSONP query parameter name(s) could be customized through the `jsonpParameterNames` property. diff --git a/src/asciidoc/web-websocket.adoc b/src/asciidoc/web-websocket.adoc index 9a2b8087dcd..d63c7f968b0 100644 --- a/src/asciidoc/web-websocket.adoc +++ b/src/asciidoc/web-websocket.adoc @@ -24,7 +24,7 @@ applications. [[websocket-intro]] == Introduction -The WebSocket protocol http://tools.ietf.org/html/rfc6455[RFC 6455] defines an important +The WebSocket protocol https://tools.ietf.org/html/rfc6455[RFC 6455] defines an important new capability for web applications: full-duplex, two-way communication between client and server. It is an exciting new capability on the heels of a long history of techniques to make the web more interactive including Java Applets, XMLHttpRequest, @@ -40,7 +40,7 @@ server can use it to send messages to each other. Spring Framework 4 includes a new `spring-websocket` module with comprehensive WebSocket support. It is compatible with the Java WebSocket API standard -(http://jcp.org/en/jsr/detail?id=356[JSR-356]) +(https://jcp.org/en/jsr/detail?id=356[JSR-356]) and also provides additional value-add as explained in the rest of the introduction. @@ -49,12 +49,12 @@ and also provides additional value-add as explained in the rest of the introduct === WebSocket Fallback Options An important challenge to adoption is the lack of support for WebSocket in some browsers. Notably the first Internet Explorer version to support WebSocket is -version 10 (see http://caniuse.com/websockets for support by browser versions). +version 10 (see https://caniuse.com/websockets for support by browser versions). Furthermore, some restrictive proxies may be configured in ways that either preclude the attempt to do an HTTP upgrade or otherwise break connection after some time because it has remained opened for too long. A good overview on this topic from Peter Lubbers is available in the InfoQ article -http://www.infoq.com/articles/Web-Sockets-Proxy-Servers["How HTML5 Web Sockets Interact With Proxy Servers"]. +https://www.infoq.com/articles/Web-Sockets-Proxy-Servers["How HTML5 Web Sockets Interact With Proxy Servers"]. Therefore to build a WebSocket application today, fallback options are required in order to simulate the WebSocket API where necessary. The Spring Framework provides @@ -83,7 +83,7 @@ to traditional messaging applications (e.g. JMS, AMQP). Spring Framework 4 includes a new `spring-messaging` module with key abstractions from the -http://projects.spring.io/spring-integration/[Spring Integration] project +https://projects.spring.io/spring-integration/[Spring Integration] project such as `Message`, `MessageChannel`, `MessageHandler`, and others that can serve as a foundation for such a messaging architecture. The module also includes a set of annotations for mapping messages to methods, similar to the Spring MVC @@ -108,7 +108,7 @@ most web applications today are written using a web framework rather than the Servlet API alone. For this reason the WebSocket RFC defines the use of -http://tools.ietf.org/html/rfc6455#section-1.9[sub-protocols]. +https://tools.ietf.org/html/rfc6455#section-1.9[sub-protocols]. During the handshake, the client and server can use the header `Sec-WebSocket-Protocol` to agree on a sub-protocol, i.e. a higher, application-level protocol to use. The use of a sub-protocol is not required, but @@ -117,7 +117,7 @@ format that both the client and server can understand. That format can be custom framework-specific, or a standard messaging protocol. The Spring Framework provides support for using -http://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] -- a simple, messaging protocol +https://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] -- a simple, messaging protocol originally created for use in scripting languages with frames inspired by HTTP. STOMP is widely supported and well suited for use over WebSocket and over the web. @@ -249,9 +249,9 @@ XML configuration equivalent: 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"> @@ -304,9 +304,9 @@ And the XML configuration equivalent: 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"> @@ -386,7 +386,7 @@ through the use of the `` element in `web.xml`: 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"> @@ -405,7 +405,7 @@ Java initialization API, if required: 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"> @@ -453,9 +453,9 @@ or WebSocket XML namespace: 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"> @@ -511,9 +511,9 @@ or WebSocket XML namespace: 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"> @@ -578,7 +578,7 @@ WebSocket and SockJS allowed origins can be configured as shown bellow: @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { - registry.addHandler(myHandler(), "/myHandler").setAllowedOrigins("http://mydomain.com"); + registry.addHandler(myHandler(), "/myHandler").setAllowedOrigins("https://mydomain.com"); } @Bean @@ -599,11 +599,11 @@ XML configuration equivalent: 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"> - + @@ -632,7 +632,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. * As of 4.1 `spring-websocket` also provides a SockJS Java client. @@ -679,7 +679,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 enable `TRACE` logging for `org.springframework.web.socket`. For even more detail refer to 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]. [[websocket-fallback-sockjs-enable]] @@ -716,9 +716,9 @@ and the XML configuration equivalent: 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"> @@ -752,7 +752,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 via 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 very often essential for Java applications. However since the SockJS client can be used with many server @@ -833,7 +833,7 @@ from concluding a connection is hung. The Spring SockJS configuration has a prop called `heartbeatTime` that can be used to customize the frequency. By default a heartbeat is sent after 25 seconds assuming no other messages were sent on that connection. This 25 seconds 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] ==== @@ -995,7 +995,7 @@ messages. [[websocket-stomp-overview]] === Overview of STOMP -http://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] is a simple +https://stomp.github.io/stomp-specification-1.2.html#Abstract[STOMP] is a simple text-oriented messaging protocol that was originally created for scripting languages such as Ruby, Python, and Perl to connect to enterprise message brokers. It is designed to address a subset of commonly used messaging patterns. STOMP can be @@ -1083,7 +1083,7 @@ client subscription. The above overview is intended to provide the most basic understanding of the STOMP protocol. It is recommended to review 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. The benefits of using STOMP as a WebSocket sub-protocol: @@ -1142,9 +1142,9 @@ and in XML: 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"> @@ -1449,8 +1449,8 @@ sending loop, and is not suitable for clustering. As an alternative, application can upgrade to using a full-featured message broker. Check the STOMP documentation for your message broker of choice (e.g. -http://www.rabbitmq.com/stomp.html[RabbitMQ], -http://activemq.apache.org/stomp.html[ActiveMQ], etc.), install the broker, +https://www.rabbitmq.com/stomp.html[RabbitMQ], +https://activemq.apache.org/stomp.html[ActiveMQ], etc.), install the broker, and run it with STOMP support enabled. Then enable the STOMP broker relay in the Spring configuration instead of the simple broker. @@ -1487,9 +1487,9 @@ XML configuration equivalent: 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"> @@ -1605,9 +1605,9 @@ In XML config: 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"> @@ -1786,7 +1786,7 @@ over, all unique user queues are removed. For example, RabbitMQ creates auto-del queues when destinations like `/exchange/amq.direct/position-updates` are used. 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. ==== @@ -2141,9 +2141,9 @@ Here is example configuration: 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"> @@ -2193,9 +2193,9 @@ Here is example configuration: 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"> diff --git a/src/asciidoc/whats-new.adoc b/src/asciidoc/whats-new.adoc index 5ad8910db53..073f5bfc4e2 100644 --- a/src/asciidoc/whats-new.adoc +++ b/src/asciidoc/whats-new.adoc @@ -40,7 +40,7 @@ version 4.0. If you are upgrading from a previous release of Spring, you should that you have fixed any deprecated calls that you were making to outdated APIs. For a complete set of changes, check out the -http://docs.spring.io/spring-framework/docs/3.2.4.RELEASE_to_4.0.0.RELEASE/[API +https://docs.spring.io/spring-framework/docs/3.2.4.RELEASE_to_4.0.0.RELEASE/[API Differences Report]. Note that optional third-party dependencies have been raised to a 2010/2011 minimum @@ -56,7 +56,7 @@ retained for the time being where Spring 3.2 had it; now just in deprecated form === Java 8 (as well as 6 and 7) Spring Framework 4.0 provides support for several Java 8 features. You can make use of __lambda expressions__ and __method references__ with Spring's callback interfaces. There -is first-class support for `java.time` (http://jcp.org/en/jsr/detail?id=310[JSR-310]), +is first-class support for `java.time` (https://jcp.org/en/jsr/detail?id=310[JSR-310]), and several existing annotations have been retrofitted as `@Repeatable`. You can also use Java 8's parameter name discovery (based on the `-parameters` compiler flag) as an alternative to compiling your code with debug information enabled. @@ -152,7 +152,7 @@ There have been several general improvements to the core container: been added via the `@Conditional` annotation. This is similar to `@Profile` support but allows for user-defined strategies to be developed programmatically. * <> no longer require a default - constructor. Support is provided via the http://code.google.com/p/objenesis/[objenesis] + constructor. Support is provided via the https://code.google.com/p/objenesis/[objenesis] library which is repackaged __inline__ and distributed as part of the Spring Framework. With this strategy, no constructor at all is being invoked for proxy instances anymore. * There is managed time zone support across the framework now, e.g. on `LocaleContext`. @@ -183,7 +183,7 @@ have been made to Spring's Web modules: === WebSocket, SockJS, and STOMP Messaging A new `spring-websocket` module provides comprehensive support for WebSocket-based, two-way communication between client and server in web applications. It is compatible with -http://jcp.org/en/jsr/detail?id=356[JSR-356], the Java WebSocket API, and in addition +https://jcp.org/en/jsr/detail?id=356[JSR-356], the Java WebSocket API, and in addition provides SockJS-based fallback options (i.e. WebSocket emulation) for use in browsers that don't yet support the WebSocket protocol (e.g. Internet Explorer < 10). @@ -193,7 +193,7 @@ processing STOMP messages from WebSocket clients. As a result an `@Controller` can now contain both `@RequestMapping` and `@MessageMapping` methods for handling HTTP requests and messages from WebSocket-connected clients. The new `spring-messaging` module also contains key abstractions formerly from the -http://projects.spring.io/spring-integration/[Spring Integration] project such as +https://projects.spring.io/spring-integration/[Spring Integration] project such as `Message`, `MessageChannel`, `MessageHandler`, and others to serve as a foundation for messaging-based applications. @@ -332,7 +332,7 @@ method has been added. https://jira.spring.io/browse/SPR-11543?focusedCommentId=100308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-100308[listed here]. ** Path matching customizations are frequently used and now built-in. See <>. -* http://groovy-lang.org/docs/groovy-2.3.6/html/documentation/markup-template-engine.html[Groovy markup template] +* http://groovy-lang.org/404.html[Groovy markup template] support (based on Groovy 2.3). See the `GroovyMarkupConfigurer` and respecitve `ViewResolver` and `View' implementations. @@ -537,7 +537,7 @@ public @interface MyTestConfig { * `UriTemplateHandler` extension point in the `RestTemplate`. ** `DefaultUriTemplateHandler` exposes `baseUrl` property and path segment encoding options. ** the extension point can also be used to plug in any URI template library. -* http://square.github.io/okhttp/[OkHTTP] integration with the `RestTemplate`. +* https://square.github.io/okhttp/[OkHTTP] integration with the `RestTemplate`. * Custom `baseUrl` alternative for methods in `MvcUriComponentsBuilder`. * Serialization/deserialization exception messages are now logged at WARN level. * Default JSON prefix has been changed from "{} && " to the safer ")]}', " one. diff --git a/src/dist/license.txt b/src/dist/license.txt index 11098b2f63b..1c5ff02e2b7 100644 --- a/src/dist/license.txt +++ b/src/dist/license.txt @@ -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 +Copyright (c) 1999-2009, OW2 Consortium >>> 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, diff --git a/src/dist/readme.txt b/src/dist/readme.txt index 03c97100d12..9bab4389f83 100644 --- a/src/dist/readme.txt +++ b/src/dist/readme.txt @@ -6,7 +6,7 @@ https://jira.spring.io/browse/SPR 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.