Merge pull request #1266 from spring-operator/polish-urls-remaining-master
URL Cleanup
This commit is contained in:
@@ -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
|
||||
----
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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/";
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user