From 32e77a48661745ab108ee08543943abb1db0a15a Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 03:11:56 -0500 Subject: [PATCH] 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). 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://example.com/oauth/token (404) with 1 occurrences migrated to: https://example.com/oauth/token ([https](https://example.com/oauth/token) result 404). * [ ] http://my-app.cfapps.io (404) with 1 occurrences migrated to: https://my-app.cfapps.io ([https](https://my-app.cfapps.io) result 404). * [ ] 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). These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/ with 1 occurrences migrated to: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/ ([https](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/) result 200). * [ ] http://example.com with 9 occurrences migrated to: https://example.com ([https](https://example.com) result 200). * [ ] 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). --- .github/CONTRIBUTING.md | 4 ++-- README.adoc | 22 +++++++++++-------- .../asciidoc/spring-cloud-cloudfoundry.adoc | 2 +- .../CloudFoundryDiscoveryClientTest.java | 2 +- ...dentialsEnvironmentPostProcessorTests.java | 20 ++++++++--------- 5 files changed, 27 insertions(+), 23 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 c73f895..ad1934d 100644 --- a/README.adoc +++ b/README.adoc @@ -1,4 +1,8 @@ -// Do not edit this file (e.g. go instead to src/main/asciidoc) +//// +DO NOT EDIT THIS FILE. IT WAS GENERATED. +Manual changes to this file will be lost when it is generated again. +Edit the files in the src/main/asciidoc/ directory instead. +//// = Spring Cloud for Cloudfoundry @@ -65,7 +69,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://docs.docker.com/compose/[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, @@ -87,13 +91,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". @@ -151,7 +155,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 @@ -164,7 +168,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). @@ -235,7 +239,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"> diff --git a/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc b/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc index 08ed038..125df81 100644 --- a/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc +++ b/docs/src/main/asciidoc/spring-cloud-cloudfoundry.adoc @@ -19,7 +19,7 @@ are configured, they default per the user's profile in Cloud Foundry. NOTE: All of the OAuth2 SSO and resource server features moved to Spring Boot in version 1.3. You can find documentation in the -http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/[Spring Boot user guide]. +https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/[Spring Boot user guide]. This project provides automatic binding from CloudFoundry service credentials to the Spring Boot features. If you have a CloudFoundry diff --git a/spring-cloud-cloudfoundry-discovery/src/test/java/org/springframework/cloud/cloudfoundry/discovery/CloudFoundryDiscoveryClientTest.java b/spring-cloud-cloudfoundry-discovery/src/test/java/org/springframework/cloud/cloudfoundry/discovery/CloudFoundryDiscoveryClientTest.java index 609b5f2..69a9f65 100644 --- a/spring-cloud-cloudfoundry-discovery/src/test/java/org/springframework/cloud/cloudfoundry/discovery/CloudFoundryDiscoveryClientTest.java +++ b/spring-cloud-cloudfoundry-discovery/src/test/java/org/springframework/cloud/cloudfoundry/discovery/CloudFoundryDiscoveryClientTest.java @@ -87,7 +87,7 @@ public class CloudFoundryDiscoveryClientTest { .id("id") .requestedState("requestedState") .runningInstances(2) - .url("http://my-app.cfapps.io") + .url("http://my-app-cfapps-io") .diskQuota(20) .build(); InstanceDetail instanceDetail = InstanceDetail diff --git a/spring-cloud-cloudfoundry-web/src/test/java/org/springframework/cloud/cloudfoundry/environment/VcapServiceCredentialsEnvironmentPostProcessorTests.java b/spring-cloud-cloudfoundry-web/src/test/java/org/springframework/cloud/cloudfoundry/environment/VcapServiceCredentialsEnvironmentPostProcessorTests.java index 9b68981..1ba9f97 100644 --- a/spring-cloud-cloudfoundry-web/src/test/java/org/springframework/cloud/cloudfoundry/environment/VcapServiceCredentialsEnvironmentPostProcessorTests.java +++ b/spring-cloud-cloudfoundry-web/src/test/java/org/springframework/cloud/cloudfoundry/environment/VcapServiceCredentialsEnvironmentPostProcessorTests.java @@ -65,42 +65,42 @@ public class VcapServiceCredentialsEnvironmentPostProcessorTests { @Test public void addTokenUri() { - TestPropertyValues.of( "vcap.services.sso.credentials.accessTokenUri:http://example.com").applyTo(this.environment); + TestPropertyValues.of( "vcap.services.sso.credentials.accessTokenUri:http://exampledomain").applyTo(this.environment); this.listener.postProcessEnvironment(this.environment, new SpringApplication()); - assertEquals("http://example.com", this.environment + assertEquals("http://exampledomain", this.environment .resolvePlaceholders("${security.oauth2.client.access-token-uri}")); } @Test public void addTokenUriAuthDomain() { - TestPropertyValues.of("vcap.services.sso.credentials.auth-domain:http://example.com").applyTo(this.environment); + TestPropertyValues.of("vcap.services.sso.credentials.auth-domain:http://exampledomain").applyTo(this.environment); this.listener.postProcessEnvironment(this.environment, new SpringApplication()); - assertEquals("http://example.com/oauth/token", this.environment + assertEquals("http://exampledomain/oauth/token", this.environment .resolvePlaceholders("${security.oauth2.client.access-token-uri}")); } @Test public void addUserInfoUri() { - TestPropertyValues.of( "vcap.services.sso.credentials.userInfoUri:http://example.com").applyTo(this.environment); + TestPropertyValues.of( "vcap.services.sso.credentials.userInfoUri:http://exampledomain").applyTo(this.environment); this.listener.postProcessEnvironment(this.environment, new SpringApplication()); - assertEquals("http://example.com", this.environment + assertEquals("http://exampledomain", this.environment .resolvePlaceholders("${security.oauth2.resource.user-info-uri}")); } @Test public void addServiceId() { - TestPropertyValues.of("vcap.services.my.credentials.accessTokenUri:http://example.com", + TestPropertyValues.of("vcap.services.my.credentials.accessTokenUri:http://exampledomain", "security.oauth2.sso.serviceId:my").applyTo(this.environment); this.listener.postProcessEnvironment(this.environment, new SpringApplication()); - assertEquals("http://example.com", this.environment + assertEquals("http://exampledomain", this.environment .resolvePlaceholders("${security.oauth2.client.access-token-uri}")); } @Test public void addJwtKeyUri() { - TestPropertyValues.of("vcap.services.sso.credentials.keyUri:http://example.com").applyTo(this.environment); + TestPropertyValues.of("vcap.services.sso.credentials.keyUri:http://exampledomain").applyTo(this.environment); this.listener.postProcessEnvironment(this.environment, new SpringApplication()); - assertEquals("http://example.com", this.environment + assertEquals("http://exampledomain", this.environment .resolvePlaceholders("${security.oauth2.resource.jwt.key-uri}")); }