From aa815007948944cfa5e87c2ae16bca98dca35e79 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 14 Feb 2019 17:33:24 +0000 Subject: [PATCH 1/9] Bumping versions --- README.adoc | 163 +++++++++++++++++++++++++- pom.xml | 4 +- spring-cloud-bus-dependencies/pom.xml | 2 +- 3 files changed, 160 insertions(+), 9 deletions(-) diff --git a/README.adoc b/README.adoc index 640a47e..fa8fc64 100644 --- a/README.adoc +++ b/README.adoc @@ -2,12 +2,22 @@ = Spring Cloud Bus -Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be used to broadcast state changes (e.g. configuration changes) or other management instructions. A key idea is that the Bus is like a distributed Actuator for a Spring Boot application that is scaled out, but it can also be used as a communication channel between apps. Starters are provided for an AMQP broker as the transport or for Kafka, but the same basic feature set (and some more depending on the transport) is on the roadmap for other transports. - +Spring Cloud Bus links the nodes of a distributed system with a lightweight message +broker. This broker can then be used to broadcast state changes (such as configuration +changes) or other management instructions. A key idea is that the bus is like a +distributed actuator for a Spring Boot application that is scaled out. However, it can +also be used as a communication channel between apps. This project provides starters for +either an AMQP broker or Kafka as the transport. == Quick Start -Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the classpath. All you need to do to enable the bus is to add `spring-cloud-starter-bus-amqp` or `spring-cloud-starter-bus-kafka` to your dependency management and Spring Cloud takes care of the rest. Make sure the broker (RabbitMQ or Kafka) is available and configured: running on localhost you shouldn't have to do anything, but if you are running remotely use Spring Cloud Connectors, or Spring Boot conventions to define the broker credentials, e.g. for Rabbit +Spring Cloud Bus works by adding Spring Boot autconfiguration if it detects itself on the +classpath. To enable the bus, add `spring-cloud-starter-bus-amqp` or +`spring-cloud-starter-bus-kafka` to your dependency management. Spring Cloud takes care of +the rest. Make sure the broker (RabbitMQ or Kafka) is available and configured. When +running on localhost, you need not do anything. If you run remotely, use Spring Cloud +Connectors or Spring Boot conventions to define the broker credentials, as shown in the +following example for Rabbit: .application.yml ---- @@ -19,9 +29,16 @@ spring: password: secret ---- -The bus currently supports sending messages to all nodes listening or all nodes for a particular service (as defined by Eureka). More selector criteria may be added in the future (ie. only service X nodes in data center Y, etc...). There are also some http endpoints under the `/bus/*` actuator namespace. There are currently two implemented. The first, `/bus/env`, sends key/value pairs to update each node's Spring Environment. The second, `/bus/refresh`, will reload each application's configuration, just as if they had all been pinged on their `/refresh` endpoint. +The bus currently supports sending messages to all nodes listening or all nodes for a +particular service (as defined by Eureka). The `/bus/*` actuator namespace has some HTTP +endpoints. Currently, two are implemented. The first, `/bus/env`, sends key/value pairs to +update each node's Spring Environment. The second, `/bus/refresh`, reloads each +application's configuration, as though they had all been pinged on their `/refresh` +endpoint. -NOTE: The Bus starters cover Rabbit and Kafka, because those are the two most common implementations, but Spring Cloud Stream is quite flexible and binder will work combined with `spring-cloud-bus`. +NOTE: The Spring Cloud Bus starters cover Rabbit and Kafka, because those are the two most +common implementations. However, Spring Cloud Stream is quite flexible, and the binder +works with `spring-cloud-bus`. == Building @@ -116,6 +133,8 @@ from the `file` menu. == Contributing +:spring-cloud-build-branch: master + Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want @@ -159,4 +178,136 @@ added after the original pull request but before a merge. other target branch in the main project). * When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit - message (where XXXX is the issue number). \ No newline at end of file + message (where XXXX is the issue number). + +=== Checkstyle + +Spring Cloud Build comes with a set of checkstyle rules. You can find them in the `spring-cloud-build-tools` module. The most notable files under the module are: + +.spring-cloud-build-tools/ +---- +└── src +    ├── checkstyle +    │   └── checkstyle-suppressions.xml <3> +    └── main +    └── resources +    ├── checkstyle-header.txt <2> +    └── checkstyle.xml <1> +---- +<1> Default Checkstyle rules +<2> File header setup +<3> Default suppression rules + +==== Checkstyle configuration + +Checkstyle rules are *disabled by default*. To add checkstyle to your project just define the following properties and plugins. + +.pom.xml +---- + +true <1> + true + <2> + true + <3> + + + + + <4> + io.spring.javaformat + spring-javaformat-maven-plugin + + <5> + org.apache.maven.plugins + maven-checkstyle-plugin + + + + + + <5> + org.apache.maven.plugins + maven-checkstyle-plugin + + + + +---- +<1> Fails the build upon Checkstyle errors +<2> Fails the build upon Checkstyle violations +<3> Checkstyle analyzes also the test sources +<4> Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules +<5> Add checkstyle plugin to your build and reporting phases + +If you need to suppress some rules (e.g. line length needs to be longer), then it's enough for you to define a file under `${project.root}/src/checkstyle/checkstyle-suppressions.xml` with your suppressions. Example: + +.projectRoot/src/checkstyle/checkstyle-suppresions.xml +---- + + + + + + +---- + +It's advisable to copy the `${spring-cloud-build.rootFolder}/.editorconfig` and `${spring-cloud-build.rootFolder}/.springformat` to your project. That way, some default formatting rules will be applied. You can do so by running this script: + +```bash +$ curl https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/.editorconfig -o .editorconfig +$ touch .springformat +``` + +=== IDE setup + +==== Intellij IDEA + +In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. + +.spring-cloud-build-tools/ +---- +└── src +    ├── checkstyle +    │   └── checkstyle-suppressions.xml <3> +    └── main +    └── resources +    ├── checkstyle-header.txt <2> +    ├── checkstyle.xml <1> +    └── intellij +       ├── Intellij_Project_Defaults.xml <4> +       └── Intellij_Spring_Boot_Java_Conventions.xml <5> +---- +<1> Default Checkstyle rules +<2> File header setup +<3> Default suppression rules +<4> Project defaults for Intellij that apply most of Checkstyle rules +<5> Project style conventions for Intellij that apply most of Checkstyle rules + +.Code style + +image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-code-style.png[Code style] + +Go to `File` -> `Settings` -> `Editor` -> `Code style`. There click on the icon next to the `Scheme` section. There, click on the `Import Scheme` value and pick the `Intellij IDEA code style XML` option. Import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml` file. + +.Inspection profiles + +image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-inspections.png[Code style] + +Go to `File` -> `Settings` -> `Editor` -> `Inspections`. There click on the icon next to the `Profile` section. There, click on the `Import Profile` and import the `spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml` file. + +.Checkstyle + +To have Intellij work with Checkstyle, you have to install the `Checkstyle` plugin. It's advisable to also install the `Assertions2Assertj` to automatically convert the JUnit assertions + +image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/{spring-cloud-build-branch}/docs/src/main/asciidoc/images/intellij-checkstyle.png[Checkstyle] + +Go to `File` -> `Settings` -> `Other settings` -> `Checkstyle`. There click on the `+` icon in the `Configuration file` section. There, you'll have to define where the checkstyle rules should be picked from. In the image above, we've picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build's GitHub repository (e.g. for the `checkstyle.xml` : `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml`). We need to provide the following variables: + +- `checkstyle.header.file` - please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt` URL. +- `checkstyle.suppressions.file` - default suppressions. Please point it to the Spring Cloud Build's, `spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` file either in your cloned repo or via the `https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml` URL. +- `checkstyle.additional.suppressions.file` - this variable corresponds to suppressions in your local project. E.g. you're working on `spring-cloud-contract`. Then point to the `project-root/src/checkstyle/checkstyle-suppressions.xml` folder. Example for `spring-cloud-contract` would be: `/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml`. + +IMPORTANT: Remember to set the `Scan Scope` to `All sources` since we apply checkstyle rules for production and test sources. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0e484e5..8862292 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.0.2.RELEASE + 2.0.5.BUILD-SNAPSHOT @@ -27,7 +27,7 @@ - 2.0.0.BUILD-SNAPSHOT + 2.0.3.BUILD-SNAPSHOT Elmhurst.BUILD-SNAPSHOT bus diff --git a/spring-cloud-bus-dependencies/pom.xml b/spring-cloud-bus-dependencies/pom.xml index e5cd491..fa9b90a 100644 --- a/spring-cloud-bus-dependencies/pom.xml +++ b/spring-cloud-bus-dependencies/pom.xml @@ -5,7 +5,7 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.0.2.BUILD-SNAPSHOT + 2.0.5.BUILD-SNAPSHOT spring-cloud-bus-dependencies From 8cc6ddc9b1183da379c1c37a1b99333a1daac590 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 22 Feb 2019 15:28:30 +0000 Subject: [PATCH 2/9] Update SNAPSHOT to 2.0.1.RELEASE --- docs/pom.xml | 2 +- pom.xml | 8 ++++---- spring-cloud-bus-dependencies/pom.xml | 4 ++-- spring-cloud-bus-tests/pom.xml | 2 +- spring-cloud-bus/pom.xml | 2 +- spring-cloud-starter-bus-amqp/pom.xml | 2 +- spring-cloud-starter-bus-kafka/pom.xml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 50f5365..8ab8037 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE pom Spring Cloud Bus Docs diff --git a/pom.xml b/pom.xml index 8862292..074f461 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE pom spring-cloud-bus-parent @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.0.5.BUILD-SNAPSHOT + 2.0.5.RELEASE @@ -27,8 +27,8 @@ - 2.0.3.BUILD-SNAPSHOT - Elmhurst.BUILD-SNAPSHOT + 2.0.3.RELEASE + Elmhurst.SR2 bus diff --git a/spring-cloud-bus-dependencies/pom.xml b/spring-cloud-bus-dependencies/pom.xml index fa9b90a..eac3020 100644 --- a/spring-cloud-bus-dependencies/pom.xml +++ b/spring-cloud-bus-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.0.5.BUILD-SNAPSHOT + 2.0.5.RELEASE spring-cloud-bus-dependencies - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE pom spring-cloud-bus-dependencies Spring Cloud Bus Dependencies diff --git a/spring-cloud-bus-tests/pom.xml b/spring-cloud-bus-tests/pom.xml index 274cbfc..851f867 100644 --- a/spring-cloud-bus-tests/pom.xml +++ b/spring-cloud-bus-tests/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE .. diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml index e9779da..aaf8650 100644 --- a/spring-cloud-bus/pom.xml +++ b/spring-cloud-bus/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE .. diff --git a/spring-cloud-starter-bus-amqp/pom.xml b/spring-cloud-starter-bus-amqp/pom.xml index 67cff6c..c3771a0 100644 --- a/spring-cloud-starter-bus-amqp/pom.xml +++ b/spring-cloud-starter-bus-amqp/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE .. spring-cloud-starter-bus-amqp diff --git a/spring-cloud-starter-bus-kafka/pom.xml b/spring-cloud-starter-bus-kafka/pom.xml index 1f711ac..ea1faa7 100644 --- a/spring-cloud-starter-bus-kafka/pom.xml +++ b/spring-cloud-starter-bus-kafka/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.1.RELEASE .. spring-cloud-starter-bus-kafka From 50f74af580d614a8fdc513741767b0eb3f098713 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 22 Feb 2019 15:29:20 +0000 Subject: [PATCH 3/9] Going back to snapshots --- docs/pom.xml | 2 +- pom.xml | 8 ++++---- spring-cloud-bus-dependencies/pom.xml | 4 ++-- spring-cloud-bus-tests/pom.xml | 2 +- spring-cloud-bus/pom.xml | 2 +- spring-cloud-starter-bus-amqp/pom.xml | 2 +- spring-cloud-starter-bus-kafka/pom.xml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 8ab8037..50f5365 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT pom Spring Cloud Bus Docs diff --git a/pom.xml b/pom.xml index 074f461..8862292 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT pom spring-cloud-bus-parent @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 2.0.5.RELEASE + 2.0.5.BUILD-SNAPSHOT @@ -27,8 +27,8 @@ - 2.0.3.RELEASE - Elmhurst.SR2 + 2.0.3.BUILD-SNAPSHOT + Elmhurst.BUILD-SNAPSHOT bus diff --git a/spring-cloud-bus-dependencies/pom.xml b/spring-cloud-bus-dependencies/pom.xml index eac3020..fa9b90a 100644 --- a/spring-cloud-bus-dependencies/pom.xml +++ b/spring-cloud-bus-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.0.5.RELEASE + 2.0.5.BUILD-SNAPSHOT spring-cloud-bus-dependencies - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT pom spring-cloud-bus-dependencies Spring Cloud Bus Dependencies diff --git a/spring-cloud-bus-tests/pom.xml b/spring-cloud-bus-tests/pom.xml index 851f867..274cbfc 100644 --- a/spring-cloud-bus-tests/pom.xml +++ b/spring-cloud-bus-tests/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT .. diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml index aaf8650..e9779da 100644 --- a/spring-cloud-bus/pom.xml +++ b/spring-cloud-bus/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-bus-amqp/pom.xml b/spring-cloud-starter-bus-amqp/pom.xml index c3771a0..67cff6c 100644 --- a/spring-cloud-starter-bus-amqp/pom.xml +++ b/spring-cloud-starter-bus-amqp/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT .. spring-cloud-starter-bus-amqp diff --git a/spring-cloud-starter-bus-kafka/pom.xml b/spring-cloud-starter-bus-kafka/pom.xml index ea1faa7..1f711ac 100644 --- a/spring-cloud-starter-bus-kafka/pom.xml +++ b/spring-cloud-starter-bus-kafka/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.RELEASE + 2.0.1.BUILD-SNAPSHOT .. spring-cloud-starter-bus-kafka From df8cf6548642617ee6a08aba61eeb31114a7a566 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Fri, 22 Feb 2019 15:29:21 +0000 Subject: [PATCH 4/9] Bumping versions to 2.0.2.BUILD-SNAPSHOT after release --- docs/pom.xml | 2 +- pom.xml | 2 +- spring-cloud-bus-dependencies/pom.xml | 2 +- spring-cloud-bus-tests/pom.xml | 2 +- spring-cloud-bus/pom.xml | 2 +- spring-cloud-starter-bus-amqp/pom.xml | 2 +- spring-cloud-starter-bus-kafka/pom.xml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 50f5365..716dd36 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT pom Spring Cloud Bus Docs diff --git a/pom.xml b/pom.xml index 8862292..e036e6f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT pom spring-cloud-bus-parent diff --git a/spring-cloud-bus-dependencies/pom.xml b/spring-cloud-bus-dependencies/pom.xml index fa9b90a..139aa53 100644 --- a/spring-cloud-bus-dependencies/pom.xml +++ b/spring-cloud-bus-dependencies/pom.xml @@ -9,7 +9,7 @@ spring-cloud-bus-dependencies - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT pom spring-cloud-bus-dependencies Spring Cloud Bus Dependencies diff --git a/spring-cloud-bus-tests/pom.xml b/spring-cloud-bus-tests/pom.xml index 274cbfc..76c4553 100644 --- a/spring-cloud-bus-tests/pom.xml +++ b/spring-cloud-bus-tests/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml index e9779da..0917f28 100644 --- a/spring-cloud-bus/pom.xml +++ b/spring-cloud-bus/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-bus-amqp/pom.xml b/spring-cloud-starter-bus-amqp/pom.xml index 67cff6c..158a477 100644 --- a/spring-cloud-starter-bus-amqp/pom.xml +++ b/spring-cloud-starter-bus-amqp/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT .. spring-cloud-starter-bus-amqp diff --git a/spring-cloud-starter-bus-kafka/pom.xml b/spring-cloud-starter-bus-kafka/pom.xml index 1f711ac..107e0d6 100644 --- a/spring-cloud-starter-bus-kafka/pom.xml +++ b/spring-cloud-starter-bus-kafka/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-bus-parent - 2.0.1.BUILD-SNAPSHOT + 2.0.2.BUILD-SNAPSHOT .. spring-cloud-starter-bus-kafka From 9386c48d66f97f9beaa76a82baaf2cd76842a007 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Sat, 16 Mar 2019 08:38:40 -0700 Subject: [PATCH 5/9] URL Cleanup (#157) This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://maven.apache.org/xsd/maven-4.0.0.xsd with 7 occurrences migrated to: https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200). * http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch with 1 occurrences migrated to: https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch ([https](https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch) result 200). * http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin with 1 occurrences migrated to: https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin ([https](https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin) result 200). * http://www.apache.org/licenses/LICENSE-2.0 with 2 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 with 14 occurrences * http://www.w3.org/2001/XMLSchema-instance with 7 occurrences --- docs/pom.xml | 2 +- docs/src/main/asciidoc/ghpages.sh | 4 ++-- mvnw | 2 +- mvnw.cmd | 2 +- pom.xml | 2 +- spring-cloud-bus-dependencies/pom.xml | 2 +- spring-cloud-bus-tests/pom.xml | 2 +- spring-cloud-bus/pom.xml | 2 +- spring-cloud-starter-bus-amqp/pom.xml | 2 +- spring-cloud-starter-bus-kafka/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/pom.xml b/docs/pom.xml index 716dd36..effaeeb 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -1,5 +1,5 @@ - + 4.0.0 org.springframework.cloud spring-cloud-bus-docs diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index 57c5da3..55e76be 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -40,7 +40,7 @@ function check_if_anything_to_sync() { function retrieve_current_branch() { # Code getting the name of the current branch. For master we want to publish as we did until now - # http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch + # https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch # If there is a branch already passed will reuse it - otherwise will try to find it CURRENT_BRANCH=${BRANCH} if [[ -z "${CURRENT_BRANCH}" ]] ; then @@ -147,7 +147,7 @@ function copy_docs_for_current_version() { COMMIT_CHANGES="yes" else echo -e "Current branch is [${CURRENT_BRANCH}]" - # http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin + # https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH} echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder" diff --git a/mvnw b/mvnw index 25f750c..a08b219 100755 --- a/mvnw +++ b/mvnw @@ -8,7 +8,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an diff --git a/mvnw.cmd b/mvnw.cmd index b0dc0e7..7ecd01d 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -7,7 +7,7 @@ @REM "License"); you may not use this file except in compliance @REM with the License. You may obtain a copy of the License at @REM -@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM https://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, @REM software distributed under the License is distributed on an diff --git a/pom.xml b/pom.xml index e036e6f..197aacd 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-cloud-bus-parent diff --git a/spring-cloud-bus-dependencies/pom.xml b/spring-cloud-bus-dependencies/pom.xml index 139aa53..ccf7be8 100644 --- a/spring-cloud-bus-dependencies/pom.xml +++ b/spring-cloud-bus-dependencies/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-cloud-dependencies-parent diff --git a/spring-cloud-bus-tests/pom.xml b/spring-cloud-bus-tests/pom.xml index 76c4553..26348d9 100644 --- a/spring-cloud-bus-tests/pom.xml +++ b/spring-cloud-bus-tests/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-cloud-bus-tests diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml index 0917f28..926a081 100644 --- a/spring-cloud-bus/pom.xml +++ b/spring-cloud-bus/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-cloud-bus diff --git a/spring-cloud-starter-bus-amqp/pom.xml b/spring-cloud-starter-bus-amqp/pom.xml index 158a477..774cfb5 100644 --- a/spring-cloud-starter-bus-amqp/pom.xml +++ b/spring-cloud-starter-bus-amqp/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.cloud diff --git a/spring-cloud-starter-bus-kafka/pom.xml b/spring-cloud-starter-bus-kafka/pom.xml index 107e0d6..e0f6fca 100644 --- a/spring-cloud-starter-bus-kafka/pom.xml +++ b/spring-cloud-starter-bus-kafka/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.cloud From 06db8a11081b5fa2c506b5a670d53709972d2345 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Thu, 21 Mar 2019 11:13:38 -0500 Subject: [PATCH 6/9] URL Cleanup This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to: https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200). * [ ] http://www.apache.org/licenses/LICENSE-2.0 with 36 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200). --- LICENSE.txt | 4 ++-- .../org/springframework/cloud/bus/BusAutoConfiguration.java | 2 +- .../cloud/bus/BusEnvironmentPostProcessor.java | 2 +- .../java/org/springframework/cloud/bus/BusPathMatcher.java | 2 +- .../java/org/springframework/cloud/bus/BusProperties.java | 2 +- .../cloud/bus/BusPropertiesAutoConfiguration.java | 2 +- .../springframework/cloud/bus/ConditionalOnBusEnabled.java | 2 +- .../org/springframework/cloud/bus/DefaultBusPathMatcher.java | 2 +- .../java/org/springframework/cloud/bus/ServiceMatcher.java | 2 +- .../org/springframework/cloud/bus/SpringCloudBusClient.java | 2 +- .../cloud/bus/endpoint/AbstractBusEndpoint.java | 2 +- .../cloud/bus/endpoint/EnvironmentBusEndpoint.java | 2 +- .../cloud/bus/endpoint/RefreshBusEndpoint.java | 2 +- .../cloud/bus/event/AckRemoteApplicationEvent.java | 2 +- .../cloud/bus/event/EnvironmentChangeListener.java | 2 +- .../bus/event/EnvironmentChangeRemoteApplicationEvent.java | 2 +- .../org/springframework/cloud/bus/event/RefreshListener.java | 2 +- .../cloud/bus/event/RefreshRemoteApplicationEvent.java | 2 +- .../cloud/bus/event/RemoteApplicationEvent.java | 2 +- .../springframework/cloud/bus/event/SentApplicationEvent.java | 2 +- .../org/springframework/cloud/bus/event/TraceListener.java | 2 +- .../cloud/bus/event/UnknownRemoteApplicationEvent.java | 2 +- .../cloud/bus/jackson/BusJacksonAutoConfiguration.java | 2 +- .../cloud/bus/jackson/RemoteApplicationEventRegistrar.java | 2 +- .../cloud/bus/jackson/RemoteApplicationEventScan.java | 2 +- .../org/springframework/cloud/bus/jackson/SubtypeModule.java | 2 +- .../springframework/cloud/bus/BusAutoConfigurationTests.java | 2 +- .../cloud/bus/ConditionalOnBusEnabledTests.java | 2 +- .../org/springframework/cloud/bus/ServiceMatcherTests.java | 2 +- .../cloud/bus/endpoint/RefreshBusEndpointTests.java | 2 +- .../cloud/bus/event/test/TestRemoteApplicationEvent.java | 2 +- .../cloud/bus/event/test/TypedRemoteApplicationEvent.java | 2 +- .../cloud/bus/jackson/RemoteApplicationEventScanTests.java | 2 +- .../springframework/cloud/bus/jackson/SerializationTests.java | 2 +- .../springframework/cloud/bus/jackson/SubtypeModuleTests.java | 2 +- .../java/test/foo/bar/FooBarTestRemoteApplicationEvent.java | 2 +- 36 files changed, 37 insertions(+), 37 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d645695..62589ed 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,7 +1,7 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -193,7 +193,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java index 3bb7579..56eb9b4 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusEnvironmentPostProcessor.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusEnvironmentPostProcessor.java index 56d55fd..4e11d28 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusEnvironmentPostProcessor.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusEnvironmentPostProcessor.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPathMatcher.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPathMatcher.java index e7b82e2..141156e 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPathMatcher.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPathMatcher.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusProperties.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusProperties.java index 52aa5f3..cd1d6eb 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusProperties.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusProperties.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPropertiesAutoConfiguration.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPropertiesAutoConfiguration.java index 5e06e52..cf7e389 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPropertiesAutoConfiguration.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusPropertiesAutoConfiguration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ConditionalOnBusEnabled.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ConditionalOnBusEnabled.java index a2a0d4a..84875e8 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ConditionalOnBusEnabled.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ConditionalOnBusEnabled.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/DefaultBusPathMatcher.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/DefaultBusPathMatcher.java index 2273e24..8d200bf 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/DefaultBusPathMatcher.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/DefaultBusPathMatcher.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ServiceMatcher.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ServiceMatcher.java index 6dbe3dd..20fe44d 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ServiceMatcher.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/ServiceMatcher.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/SpringCloudBusClient.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/SpringCloudBusClient.java index b6dacee..6ef5bf7 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/SpringCloudBusClient.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/SpringCloudBusClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/AbstractBusEndpoint.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/AbstractBusEndpoint.java index 59456a4..e31420c 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/AbstractBusEndpoint.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/AbstractBusEndpoint.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/EnvironmentBusEndpoint.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/EnvironmentBusEndpoint.java index 96cfe57..19a068a 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/EnvironmentBusEndpoint.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/EnvironmentBusEndpoint.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpoint.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpoint.java index c8d8061..9126ee5 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpoint.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpoint.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/AckRemoteApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/AckRemoteApplicationEvent.java index 55834c3..3cfdf92 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/AckRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/AckRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeListener.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeListener.java index 62686e0..db2a394 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeListener.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeListener.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeRemoteApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeRemoteApplicationEvent.java index 77fef8f..7287820 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/EnvironmentChangeRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshListener.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshListener.java index 433ac45..e6c64a4 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshListener.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshListener.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshRemoteApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshRemoteApplicationEvent.java index 00e0858..ec8b50c 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RefreshRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RemoteApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RemoteApplicationEvent.java index 4c2ff09..b0dae30 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RemoteApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/RemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/SentApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/SentApplicationEvent.java index 82f55e8..fe1c3fd 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/SentApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/SentApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/TraceListener.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/TraceListener.java index 067ad78..900d022 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/TraceListener.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/TraceListener.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/UnknownRemoteApplicationEvent.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/UnknownRemoteApplicationEvent.java index d289344..2e152c6 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/UnknownRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/event/UnknownRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/BusJacksonAutoConfiguration.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/BusJacksonAutoConfiguration.java index 555f304..2c3fbc1 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/BusJacksonAutoConfiguration.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/BusJacksonAutoConfiguration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventRegistrar.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventRegistrar.java index d477a22..dee474a 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventRegistrar.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventRegistrar.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScan.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScan.java index 6643ad0..e3f01f3 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScan.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScan.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/SubtypeModule.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/SubtypeModule.java index 12e9d48..1f0c75c 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/SubtypeModule.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/jackson/SubtypeModule.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java index 1a89386..09e04c1 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ConditionalOnBusEnabledTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ConditionalOnBusEnabledTests.java index e8d187e..b021011 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ConditionalOnBusEnabledTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ConditionalOnBusEnabledTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ServiceMatcherTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ServiceMatcherTests.java index 01212c8..715a3c3 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ServiceMatcherTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/ServiceMatcherTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpointTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpointTests.java index b6c867f..56ef1ef 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpointTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/endpoint/RefreshBusEndpointTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TestRemoteApplicationEvent.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TestRemoteApplicationEvent.java index 470b82c..226e477 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TestRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TestRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TypedRemoteApplicationEvent.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TypedRemoteApplicationEvent.java index 2a0ef80..f33889e 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TypedRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/event/test/TypedRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScanTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScanTests.java index 5cfd95d..a28477a 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScanTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/RemoteApplicationEventScanTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SerializationTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SerializationTests.java index 929dd4d..e5a616b 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SerializationTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SerializationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SubtypeModuleTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SubtypeModuleTests.java index 45ad149..399622a 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SubtypeModuleTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/jackson/SubtypeModuleTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-cloud-bus/src/test/java/test/foo/bar/FooBarTestRemoteApplicationEvent.java b/spring-cloud-bus/src/test/java/test/foo/bar/FooBarTestRemoteApplicationEvent.java index c0e5618..e82e238 100644 --- a/spring-cloud-bus/src/test/java/test/foo/bar/FooBarTestRemoteApplicationEvent.java +++ b/spring-cloud-bus/src/test/java/test/foo/bar/FooBarTestRemoteApplicationEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, From 584502f0d2341f1f9d0673b4962b9270c73b7a1a Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Mon, 25 Mar 2019 23:51:05 -0500 Subject: [PATCH 7/9] URL Cleanup This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://repo.spring.io/libs-milestone-local with 2 occurrences migrated to: https://repo.spring.io/libs-milestone-local ([https](https://repo.spring.io/libs-milestone-local) result 302). * [ ] http://repo.spring.io/libs-snapshot-local with 2 occurrences migrated to: https://repo.spring.io/libs-snapshot-local ([https](https://repo.spring.io/libs-snapshot-local) result 302). * [ ] http://repo.spring.io/release with 1 occurrences migrated to: https://repo.spring.io/release ([https](https://repo.spring.io/release) result 302). # Ignored These URLs were intentionally ignored. * http://maven.apache.org/POM/4.0.0 with 14 occurrences * http://www.w3.org/2001/XMLSchema-instance with 7 occurrences --- .settings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.settings.xml b/.settings.xml index 6c35512..08951ca 100644 --- a/.settings.xml +++ b/.settings.xml @@ -21,7 +21,7 @@ spring-snapshots Spring Snapshots - http://repo.spring.io/libs-snapshot-local + https://repo.spring.io/libs-snapshot-local true @@ -29,7 +29,7 @@ spring-milestones Spring Milestones - http://repo.spring.io/libs-milestone-local + https://repo.spring.io/libs-milestone-local false @@ -37,7 +37,7 @@ spring-releases Spring Releases - http://repo.spring.io/release + https://repo.spring.io/release false @@ -47,7 +47,7 @@ spring-snapshots Spring Snapshots - http://repo.spring.io/libs-snapshot-local + https://repo.spring.io/libs-snapshot-local true @@ -55,7 +55,7 @@ spring-milestones Spring Milestones - http://repo.spring.io/libs-milestone-local + https://repo.spring.io/libs-milestone-local false From 7aea9d3e50d68182bacc16c4e89724fe7d7fea23 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 03:10:01 -0500 Subject: [PATCH 8/9] URL Cleanup This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * [ ] http://compose.docker.io/ (UnknownHostException) with 1 occurrences migrated to: https://compose.docker.io/ ([https](https://compose.docker.io/) result UnknownHostException). * [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to: https://www.puppycrawl.com/dtds/suppressions_1_1.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 2 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200). * [ ] http://plugins.jetbrains.com/plugin/6546 with 2 occurrences migrated to: https://plugins.jetbrains.com/plugin/6546 ([https](https://plugins.jetbrains.com/plugin/6546) result 301). * [ ] http://eclipse.org with 1 occurrences migrated to: https://eclipse.org ([https](https://eclipse.org) result 302). * [ ] http://eclipse.org/m2e/ with 2 occurrences migrated to: https://eclipse.org/m2e/ ([https](https://eclipse.org/m2e/) result 302). * [ ] http://www.springsource.com/developer/sts with 1 occurrences migrated to: https://www.springsource.com/developer/sts ([https](https://www.springsource.com/developer/sts) result 302). # Ignored These URLs were intentionally ignored. * http://localhost with 4 occurrences --- .github/CONTRIBUTING.md | 4 ++-- README.adoc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8560ad2..eb9a16a 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -28,7 +28,7 @@ added after the original pull request but before a merge. you can import formatter settings using the `eclipse-code-formatter.xml` file from the [Spring Cloud Build](https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml) project. If using IntelliJ, you can use the - [Eclipse Code Formatter Plugin](http://plugins.jetbrains.com/plugin/6546) to import the same file. + [Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546) to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for. @@ -40,6 +40,6 @@ added after the original pull request but before a merge. * A few unit tests would help a lot as well -- someone has to do it. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). -* When writing a commit message please follow [these conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), +* When writing a commit message please follow [these conventions](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). diff --git a/README.adoc b/README.adoc index fa8fc64..63bd418 100644 --- a/README.adoc +++ b/README.adoc @@ -77,7 +77,7 @@ credentials and you already have those. The projects that require middleware generally include a `docker-compose.yml`, so consider using -http://compose.docker.io/[Docker Compose] to run the middeware servers +https://compose.docker.io/[Docker Compose] to run the middeware servers in Docker containers. See the README in the https://github.com/spring-cloud-samples/scripts[scripts demo repository] for specific instructions about the common cases of mongo, @@ -99,13 +99,13 @@ a modified file in the correct place. Just commit it and push the change. === Working with the code If you don't have an IDE preference we would recommend that you use -http://www.springsource.com/developer/sts[Spring Tools Suite] or -http://eclipse.org[Eclipse] when working with the code. We use the -http://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools +https://www.springsource.com/developer/sts[Spring Tools Suite] or +https://eclipse.org[Eclipse] when working with the code. We use the +https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools should also work without issue as long as they use Maven 3.3.3 or better. ==== Importing into eclipse with m2eclipse -We recommend the http://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with +We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with eclipse. If you don't already have m2eclipse installed it is available from the "eclipse marketplace". @@ -163,7 +163,7 @@ added after the original pull request but before a merge. `eclipse-code-formatter.xml` file from the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring Cloud Build] project. If using IntelliJ, you can use the - http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter + https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin] to import the same file. * Make sure all new `.java` files to have a simple Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is @@ -176,7 +176,7 @@ added after the original pull request but before a merge. * A few unit tests would help a lot as well -- someone has to do it. * If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). -* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], +* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number). @@ -247,7 +247,7 @@ If you need to suppress some rules (e.g. line length needs to be longer), then i + "https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> From 999a7133022d7d1f170595ee456f588d05e52d75 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Thu, 16 May 2019 15:27:41 -0400 Subject: [PATCH 9/9] Separate refresh endpoint configuration into its own auto config. Fixes #151 --- .../cloud/bus/BusAutoConfiguration.java | 26 -------- .../bus/BusRefreshAutoConfiguration.java | 59 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 1 + .../BusAutoConfigurationClassPathTests.java | 2 +- 4 files changed, 61 insertions(+), 27 deletions(-) create mode 100644 spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusRefreshAutoConfiguration.java diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java index 56eb9b4..7e1c0e7 100644 --- a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusAutoConfiguration.java @@ -29,7 +29,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.cloud.bus.endpoint.EnvironmentBusEndpoint; -import org.springframework.cloud.bus.endpoint.RefreshBusEndpoint; import org.springframework.cloud.bus.event.AckRemoteApplicationEvent; import org.springframework.cloud.bus.event.EnvironmentChangeListener; import org.springframework.cloud.bus.event.RefreshListener; @@ -38,7 +37,6 @@ import org.springframework.cloud.bus.event.SentApplicationEvent; import org.springframework.cloud.bus.event.TraceListener; import org.springframework.cloud.context.environment.EnvironmentManager; import org.springframework.cloud.context.refresh.ContextRefresher; -import org.springframework.cloud.context.scope.refresh.RefreshScope; import org.springframework.cloud.stream.annotation.EnableBinding; import org.springframework.cloud.stream.annotation.Output; import org.springframework.cloud.stream.annotation.StreamListener; @@ -176,30 +174,6 @@ public class BusAutoConfiguration implements ApplicationEventPublisherAware { } - @Bean - @ConditionalOnProperty(value = "spring.cloud.bus.refresh.enabled", matchIfMissing = true) - @ConditionalOnBean(ContextRefresher.class) - public RefreshListener refreshListener(ContextRefresher contextRefresher) { - return new RefreshListener(contextRefresher); - } - - @Configuration - @ConditionalOnClass({ Endpoint.class, RefreshScope.class }) - protected static class BusRefreshConfiguration { - - @Configuration - @ConditionalOnBean(ContextRefresher.class) - protected static class BusRefreshEndpointConfiguration { - @Bean - @ConditionalOnEnabledEndpoint - public RefreshBusEndpoint refreshBusEndpoint(ApplicationContext context, - BusProperties bus) { - return new RefreshBusEndpoint(context, bus.getId()); - } - } - - } - @Configuration @ConditionalOnClass({ Endpoint.class }) @ConditionalOnBean(HttpTraceRepository.class) diff --git a/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusRefreshAutoConfiguration.java b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusRefreshAutoConfiguration.java new file mode 100644 index 0000000..9f997bf --- /dev/null +++ b/spring-cloud-bus/src/main/java/org/springframework/cloud/bus/BusRefreshAutoConfiguration.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2019 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.springframework.cloud.bus; + +import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.cloud.bus.endpoint.RefreshBusEndpoint; +import org.springframework.cloud.bus.event.RefreshListener; +import org.springframework.cloud.context.refresh.ContextRefresher; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @author Ryan Baxter + */ +@Configuration +@ConditionalOnBusEnabled +@AutoConfigureAfter(name = {"org.springframework.cloud.autoconfigure.RefreshAutoConfiguration"}) +public class BusRefreshAutoConfiguration { + + @Bean + @ConditionalOnProperty(value = "spring.cloud.bus.refresh.enabled", matchIfMissing = true) + @ConditionalOnBean(ContextRefresher.class) + public RefreshListener refreshListener(ContextRefresher contextRefresher) { + return new RefreshListener(contextRefresher); + } + + @Configuration + @ConditionalOnBean(ContextRefresher.class) + @ConditionalOnClass(name = {"org.springframework.boot.actuate.endpoint.annotation.Endpoint", + "org.springframework.cloud.context.scope.refresh.RefreshScope"}) + protected static class BusRefreshEndpointConfiguration { + @Bean + @ConditionalOnEnabledEndpoint + public RefreshBusEndpoint refreshBusEndpoint(ApplicationContext context, + BusProperties bus) { + return new RefreshBusEndpoint(context, bus.getId()); + } + } +} diff --git a/spring-cloud-bus/src/main/resources/META-INF/spring.factories b/spring-cloud-bus/src/main/resources/META-INF/spring.factories index 04bb294..734b96d 100644 --- a/spring-cloud-bus/src/main/resources/META-INF/spring.factories +++ b/spring-cloud-bus/src/main/resources/META-INF/spring.factories @@ -1,6 +1,7 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.springframework.cloud.bus.BusPropertiesAutoConfiguration,\ org.springframework.cloud.bus.BusAutoConfiguration,\ +org.springframework.cloud.bus.BusRefreshAutoConfiguration,\ org.springframework.cloud.bus.jackson.BusJacksonAutoConfiguration # Environment Post Processor diff --git a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationClassPathTests.java b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationClassPathTests.java index 5c9958d..28e6df2 100644 --- a/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationClassPathTests.java +++ b/spring-cloud-bus/src/test/java/org/springframework/cloud/bus/BusAutoConfigurationClassPathTests.java @@ -22,7 +22,7 @@ public class BusAutoConfigurationClassPathTests { public void refreshListenerCreatedWithoutActuator() { new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(RefreshAutoConfiguration.class, - BusAutoConfiguration.class)) + BusRefreshAutoConfiguration.class)) .run(context -> assertThat(context) .hasSingleBean(RefreshListener.class) .doesNotHaveBean(RefreshBusEndpoint.class));