diff --git a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc index ddd228a01..b3e5b196a 100644 --- a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc +++ b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc @@ -932,7 +932,7 @@ If you want to find Zipkin through service discovery, you can pass the Zipkin's [source,yaml] ---- -spring.zipkin.baseUrl: http://zipkinserver/ +spring.zipkin.baseUrl: https://zipkinserver/ ---- To disable this feature just set `spring.zipkin.discoveryClientEnabled` to `false. @@ -1181,7 +1181,7 @@ shows how to do that: ---- @Autowired RestTemplate restTemplate; -Traverson traverson = new Traverson(URI.create("http://some/address"), +Traverson traverson = new Traverson(URI.create("https://some/address"), MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate); // use Traverson ---- diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/discoveryexception/WebClientDiscoveryExceptionTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/discoveryexception/WebClientDiscoveryExceptionTests.java index 9f8785c40..32be26d94 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/discoveryexception/WebClientDiscoveryExceptionTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/discoveryexception/WebClientDiscoveryExceptionTests.java @@ -111,7 +111,7 @@ public class WebClientDiscoveryExceptionTests { @Test public void testTemplate() throws Exception { shouldCloseSpanUponException((ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://exceptionservice/", Map.class)); + .getForEntity("https://exceptionservice/", Map.class)); } @FeignClient("exceptionservice") diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/exception/WebClientExceptionTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/exception/WebClientExceptionTests.java index b7482557a..762aae4d3 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/exception/WebClientExceptionTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/exception/WebClientExceptionTests.java @@ -124,7 +124,7 @@ public class WebClientExceptionTests { (ResponseEntityProvider) (tests) -> tests.testFeignInterfaceWithException .shouldFailToConnect(), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://exceptionservice/", Map.class) }; + .getForEntity("https://exceptionservice/", Map.class) }; } @FeignClient("exceptionservice") diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TracingFeignClientTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TracingFeignClientTests.java index 78a5b3b42..3f16f999b 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TracingFeignClientTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TracingFeignClientTests.java @@ -80,7 +80,7 @@ public class TracingFeignClientTests { try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(span.start())) { this.traceFeignClient .execute( - Request.create("GET", "http://foo", new HashMap<>(), + Request.create("GET", "https://foo", new HashMap<>(), "".getBytes(), Charset.defaultCharset()), new Request.Options()); } @@ -101,7 +101,7 @@ public class TracingFeignClientTests { try (Tracer.SpanInScope ws = this.tracer.withSpanInScope(span.start())) { this.traceFeignClient .execute( - Request.create("GET", "http://foo", new HashMap<>(), + Request.create("GET", "https://foo", new HashMap<>(), "".getBytes(), Charset.defaultCharset()), new Request.Options()); BDDAssertions.fail("Exception should have been thrown"); @@ -122,7 +122,7 @@ public class TracingFeignClientTests { public void should_shorten_the_span_name() throws IOException { this.traceFeignClient .execute( - Request.create("GET", "http://foo/" + bigName(), new HashMap<>(), + Request.create("GET", "https://foo/" + bigName(), new HashMap<>(), "".getBytes(), Charset.defaultCharset()), new Request.Options()); diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java index bc68b42fc..672cc1603 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java @@ -208,21 +208,21 @@ public class WebClientTests { (ResponseEntityProvider) (tests) -> tests.testFeignInterface.getNoTrace(), (ResponseEntityProvider) (tests) -> tests.testFeignInterface.getNoTrace(), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class), + .getForEntity("https://fooservice/notrace", String.class), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/notrace", String.class) }; + .getForEntity("https://fooservice/notrace", String.class) }; } @Test @@ -251,7 +251,7 @@ public class WebClientTests { return new Object[] { (ResponseEntityProvider) (tests) -> tests.testFeignInterface.headers(), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/", Map.class) }; + .getForEntity("https://fooservice/", Map.class) }; } @Test @@ -407,7 +407,7 @@ public class WebClientTests { return new Object[] { (ResponseEntityProvider) (tests) -> tests.testFeignInterface.headers(), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/traceid", String.class) }; + .getForEntity("https://fooservice/traceid", String.class) }; } @Test @@ -432,13 +432,13 @@ public class WebClientTests { (ResponseEntityProvider) (tests) -> tests.testFeignInterface .noResponseBody(), (ResponseEntityProvider) (tests) -> tests.template - .getForEntity("http://fooservice/noresponse", String.class) }; + .getForEntity("https://fooservice/noresponse", String.class) }; } @Test public void shouldCloseSpanWhenErrorControllerGetsCalled() { try { - this.template.getForEntity("http://fooservice/nonExistent", String.class); + this.template.getForEntity("https://fooservice/nonExistent", String.class); fail("An exception should be thrown"); } catch (HttpClientErrorException e) { @@ -465,7 +465,7 @@ public class WebClientTests { @Test public void shouldNotExecuteErrorControllerWhenUrlIsFound() { - this.template.getForEntity("http://fooservice/notrace", String.class); + this.template.getForEntity("https://fooservice/notrace", String.class); then(this.tracer.currentSpan()).isNull(); then(this.testErrorController.getSpan()).isNull(); diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/src/main/java/sample/SampleController.java b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/src/main/java/sample/SampleController.java index 5537690ae..b5258e452 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/src/main/java/sample/SampleController.java +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/src/main/java/sample/SampleController.java @@ -38,13 +38,13 @@ public class SampleController { @RequestMapping("/") public String hi() throws InterruptedException { Thread.sleep(this.random.nextInt(1000)); - String s = this.restTemplate.getForObject("http://zipkin/hi2", String.class); + String s = this.restTemplate.getForObject("https://zipkin/hi2", String.class); return "hi/" + s; } @RequestMapping("/call") public String traced() { - String s = this.restTemplate.getForObject("http://zipkin/call", String.class); + String s = this.restTemplate.getForObject("https://zipkin/call", String.class); return "call/" + s; } diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/src/main/resources/static/sockjs-0.3.4.js b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/src/main/resources/static/sockjs-0.3.4.js index ea1835b05..0939dbfe4 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/src/main/resources/static/sockjs-0.3.4.js +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/src/main/resources/static/sockjs-0.3.4.js @@ -289,7 +289,7 @@ SockJS = (function () { return (p + utils.random_number(max)).slice(-t); }; -// Assuming that url looks like: http://asdasd:111/asd +// Assuming that url looks like: https://asdasd:111/asd utils.getOrigin = function (url) { url += '/'; var parts = url.split('/').slice(0, 3); @@ -383,7 +383,7 @@ SockJS = (function () { throw new Error('Only basic urls are supported in SockJS'); } - // '//abc' --> 'http://abc' + // '//abc' --> 'https://abc' if (url.indexOf('//') === 0) { url = dl.protocol + url; } diff --git a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/ZipkinProperties.java b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/ZipkinProperties.java index 8a20f4d38..0b69da5ac 100644 --- a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/ZipkinProperties.java +++ b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/ZipkinProperties.java @@ -32,7 +32,7 @@ public class ZipkinProperties { /** * URL of the zipkin query server instance. You can also provide the service id of the * Zipkin server if Zipkin's registered in service discovery (e.g. - * http://zipkinserver/). + * https://zipkinserver/). */ private String baseUrl = "http://localhost:9411/"; diff --git a/spring-cloud-sleuth-zipkin/src/test/java/org/springframework/cloud/sleuth/zipkin2/ZipkinDiscoveryClientTests.java b/spring-cloud-sleuth-zipkin/src/test/java/org/springframework/cloud/sleuth/zipkin2/ZipkinDiscoveryClientTests.java index 1a381ea84..d4d66d4c1 100644 --- a/spring-cloud-sleuth-zipkin/src/test/java/org/springframework/cloud/sleuth/zipkin2/ZipkinDiscoveryClientTests.java +++ b/spring-cloud-sleuth-zipkin/src/test/java/org/springframework/cloud/sleuth/zipkin2/ZipkinDiscoveryClientTests.java @@ -43,7 +43,7 @@ import static org.assertj.core.api.BDDAssertions.then; @RunWith(SpringRunner.class) @SpringBootTest(classes = ZipkinDiscoveryClientTests.Config.class, properties = { - "spring.zipkin.baseUrl=http://zipkin/", "spring.zipkin.sender.type=web" // override + "spring.zipkin.baseUrl=https://zipkin/", "spring.zipkin.sender.type=web" // override // default // priority // which