Merge branch '2.1.x'
This commit is contained in:
@@ -112,9 +112,9 @@ public class CloudFoundryWebFluxEndpointIntegrationTests {
|
||||
this.contextRunner.run(withWebTestClient((client) -> client.options()
|
||||
.uri("/cfApplication/test").accept(MediaType.APPLICATION_JSON)
|
||||
.header("Access-Control-Request-Method", "POST")
|
||||
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
|
||||
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
|
||||
.expectHeader()
|
||||
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
|
||||
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
|
||||
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST")));
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ public class CloudFoundryWebFluxEndpointIntegrationTests {
|
||||
EndpointMediaTypes endpointMediaTypes,
|
||||
CloudFoundrySecurityInterceptor interceptor) {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
|
||||
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
|
||||
return new CloudFoundryWebFluxEndpointHandlerMapping(
|
||||
new EndpointMapping("/cfApplication"),
|
||||
|
||||
@@ -107,7 +107,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -131,7 +131,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
WebTestClient webTestClient = WebTestClient
|
||||
.bindToApplicationContext(context).build();
|
||||
@@ -145,7 +145,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -162,7 +162,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -173,7 +173,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
String cloudControllerUrl = (String) ReflectionTestUtils
|
||||
.getField(interceptorSecurityService, "cloudControllerUrl");
|
||||
assertThat(cloudControllerUrl)
|
||||
.isEqualTo("http://my-cloud-controller.com");
|
||||
.isEqualTo("https://my-cloud-controller.com");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
WebFilterChainProxy chainProxy = context
|
||||
.getBean(WebFilterChainProxy.class);
|
||||
@@ -245,7 +245,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -263,7 +263,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -287,7 +287,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
Collection<ExposableWebEndpoint> endpoints = getHandlerMapping(
|
||||
context).getEndpoints();
|
||||
@@ -322,7 +322,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com",
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com",
|
||||
"management.cloudfoundry.skip-ssl-validation:true")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
@@ -345,7 +345,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
|
||||
AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ReactiveCloudFoundrySecurityInterceptorTests {
|
||||
@Test
|
||||
public void preHandleWhenRequestIsPreFlightShouldBeOk() {
|
||||
MockServerWebExchange request = MockServerWebExchange.from(MockServerHttpRequest
|
||||
.options("/a").header(HttpHeaders.ORIGIN, "http://example.com")
|
||||
.options("/a").header(HttpHeaders.ORIGIN, "https://example.com")
|
||||
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET").build());
|
||||
StepVerifier.create(this.interceptor.preHandle(request, "/a")).consumeNextWith(
|
||||
(response) -> assertThat(response.getStatus()).isEqualTo(HttpStatus.OK))
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ReactiveCloudFoundrySecurityServiceTests {
|
||||
private static final String CLOUD_CONTROLLER_PERMISSIONS = CLOUD_CONTROLLER
|
||||
+ "/v2/apps/my-app-id/permissions";
|
||||
|
||||
private static final String UAA_URL = "http://my-cloud-controller.com/uaa";
|
||||
private static final String UAA_URL = "https://my-cloud-controller.com/uaa";
|
||||
|
||||
private ReactiveCloudFoundrySecurityService securityService;
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ public class ReactiveTokenValidatorTests {
|
||||
public void validateTokenWhenIssuerIsNotValidShouldThrowException() throws Exception {
|
||||
given(this.securityService.fetchTokenKeys()).willReturn(Mono.just(VALID_KEYS));
|
||||
given(this.securityService.getUaaUrl())
|
||||
.willReturn(Mono.just("http://other-uaa.com"));
|
||||
.willReturn(Mono.just("https://other-uaa.com"));
|
||||
String header = "{ \"alg\": \"RS256\", \"kid\": \"valid-key\", \"typ\": \"JWT\", \"scope\": [\"actuator.read\"]}";
|
||||
String claims = "{ \"exp\": 2147483647, \"iss\": \"http://localhost:8080/uaa/oauth/token\", \"scope\": [\"foo.bar\"]}";
|
||||
StepVerifier
|
||||
|
||||
@@ -85,7 +85,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -109,7 +109,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(context).build();
|
||||
mockMvc.perform(get("/cloudfoundryapplication"))
|
||||
@@ -123,7 +123,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -140,7 +140,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -151,7 +151,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
String cloudControllerUrl = (String) ReflectionTestUtils
|
||||
.getField(interceptorSecurityService, "cloudControllerUrl");
|
||||
assertThat(cloudControllerUrl)
|
||||
.isEqualTo("http://my-cloud-controller.com");
|
||||
.isEqualTo("https://my-cloud-controller.com");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com",
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com",
|
||||
"management.cloudfoundry.skip-ssl-validation:true")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
@@ -230,7 +230,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner.withUserConfiguration(TestConfiguration.class)
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
context);
|
||||
@@ -248,7 +248,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com",
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com",
|
||||
"management.endpoints.web.path-mapping.test=custom")
|
||||
.withUserConfiguration(TestConfiguration.class).run((context) -> {
|
||||
CloudFoundryWebEndpointServletHandlerMapping handlerMapping = getHandlerMapping(
|
||||
@@ -272,7 +272,7 @@ public class CloudFoundryActuatorAutoConfigurationTests {
|
||||
this.contextRunner
|
||||
.withPropertyValues("VCAP_APPLICATION:---",
|
||||
"vcap.application.application_id:my-app-id",
|
||||
"vcap.application.cf_api:http://my-cloud-controller.com")
|
||||
"vcap.application.cf_api:https://my-cloud-controller.com")
|
||||
.withConfiguration(
|
||||
AutoConfigurations.of(HealthIndicatorAutoConfiguration.class,
|
||||
HealthEndpointAutoConfiguration.class))
|
||||
|
||||
@@ -97,9 +97,9 @@ public class CloudFoundryMvcWebEndpointIntegrationTests {
|
||||
load(TestEndpointConfiguration.class, (client) -> client.options()
|
||||
.uri("/cfApplication/test").accept(MediaType.APPLICATION_JSON)
|
||||
.header("Access-Control-Request-Method", "POST")
|
||||
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
|
||||
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
|
||||
.expectHeader()
|
||||
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
|
||||
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
|
||||
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST"));
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public class CloudFoundryMvcWebEndpointIntegrationTests {
|
||||
EndpointMediaTypes endpointMediaTypes,
|
||||
CloudFoundrySecurityInterceptor interceptor) {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
|
||||
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
|
||||
return new CloudFoundryWebEndpointServletHandlerMapping(
|
||||
new EndpointMapping("/cfApplication"),
|
||||
|
||||
@@ -64,7 +64,7 @@ public class CloudFoundrySecurityInterceptorTests {
|
||||
@Test
|
||||
public void preHandleWhenRequestIsPreFlightShouldReturnTrue() {
|
||||
this.request.setMethod("OPTIONS");
|
||||
this.request.addHeader(HttpHeaders.ORIGIN, "http://example.com");
|
||||
this.request.addHeader(HttpHeaders.ORIGIN, "https://example.com");
|
||||
this.request.addHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "GET");
|
||||
SecurityResponse response = this.interceptor.preHandle(this.request,
|
||||
EndpointId.of("test"));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -49,12 +49,12 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
|
||||
*/
|
||||
public class CloudFoundrySecurityServiceTests {
|
||||
|
||||
private static final String CLOUD_CONTROLLER = "http://my-cloud-controller.com";
|
||||
private static final String CLOUD_CONTROLLER = "https://my-cloud-controller.com";
|
||||
|
||||
private static final String CLOUD_CONTROLLER_PERMISSIONS = CLOUD_CONTROLLER
|
||||
+ "/v2/apps/my-app-id/permissions";
|
||||
|
||||
private static final String UAA_URL = "http://my-uaa.com";
|
||||
private static final String UAA_URL = "https://my-uaa.com";
|
||||
|
||||
private CloudFoundrySecurityService securityService;
|
||||
|
||||
@@ -148,7 +148,7 @@ public class CloudFoundrySecurityServiceTests {
|
||||
@Test
|
||||
public void fetchTokenKeysWhenSuccessfulShouldReturnListOfKeysFromUAA() {
|
||||
this.server.expect(requestTo(CLOUD_CONTROLLER + "/info"))
|
||||
.andRespond(withSuccess("{\"token_endpoint\":\"http://my-uaa.com\"}",
|
||||
.andRespond(withSuccess("{\"token_endpoint\":\"https://my-uaa.com\"}",
|
||||
MediaType.APPLICATION_JSON));
|
||||
String tokenKeyValue = "-----BEGIN PUBLIC KEY-----\n"
|
||||
+ "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\n"
|
||||
|
||||
@@ -179,7 +179,7 @@ public class TokenValidatorTests {
|
||||
@Test
|
||||
public void validateTokenWhenIssuerIsNotValidShouldThrowException() throws Exception {
|
||||
given(this.securityService.fetchTokenKeys()).willReturn(VALID_KEYS);
|
||||
given(this.securityService.getUaaUrl()).willReturn("http://other-uaa.com");
|
||||
given(this.securityService.getUaaUrl()).willReturn("https://other-uaa.com");
|
||||
String header = "{ \"alg\": \"RS256\", \"kid\": \"valid-key\", \"typ\": \"JWT\", \"scope\": [\"actuator.read\"]}";
|
||||
String claims = "{ \"exp\": 2147483647, \"iss\": \"http://localhost:8080/uaa/oauth/token\"}";
|
||||
assertThatExceptionOfType(CloudFoundryAuthorizationException.class)
|
||||
|
||||
@@ -106,7 +106,7 @@ public class WebClientMetricsConfigurationTests {
|
||||
WebClient webClient = mockWebClient(context.getBean(WebClient.Builder.class));
|
||||
MeterRegistry registry = context.getBean(MeterRegistry.class);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
webClient.get().uri("http://example.org/projects/" + i).exchange()
|
||||
webClient.get().uri("https://example.org/projects/" + i).exchange()
|
||||
.block(Duration.ofSeconds(30));
|
||||
}
|
||||
return registry;
|
||||
@@ -115,7 +115,7 @@ public class WebClientMetricsConfigurationTests {
|
||||
private void validateWebClient(WebClient.Builder builder, MeterRegistry registry) {
|
||||
WebClient webClient = mockWebClient(builder);
|
||||
assertThat(registry.find("http.client.requests").meter()).isNull();
|
||||
webClient.get().uri("http://example.org/projects/{project}", "spring-boot")
|
||||
webClient.get().uri("https://example.org/projects/{project}", "spring-boot")
|
||||
.exchange().block(Duration.ofSeconds(30));
|
||||
assertThat(registry.find("http.client.requests")
|
||||
.tags("uri", "/projects/{project}").meter()).isNotNull();
|
||||
|
||||
@@ -36,21 +36,21 @@ public class LinkTests {
|
||||
|
||||
@Test
|
||||
public void getHrefShouldReturnHref() {
|
||||
String href = "http://example.com";
|
||||
String href = "https://example.com";
|
||||
Link link = new Link(href);
|
||||
assertThat(link.getHref()).isEqualTo(href);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isTemplatedWhenContainsPlaceholderShouldReturnTrue() {
|
||||
String href = "http://example.com/{path}";
|
||||
String href = "https://example.com/{path}";
|
||||
Link link = new Link(href);
|
||||
assertThat(link.isTemplated()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isTemplatedWhenContainsNoPlaceholderShouldReturnFalse() {
|
||||
String href = "http://example.com/path";
|
||||
String href = "https://example.com/path";
|
||||
Link link = new Link(href);
|
||||
assertThat(link.isTemplated()).isFalse();
|
||||
}
|
||||
|
||||
@@ -79,9 +79,9 @@ public class WebFluxEndpointIntegrationTests extends
|
||||
load(TestEndpointConfiguration.class, (client) -> client.options().uri("/test")
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.header("Access-Control-Request-Method", "POST")
|
||||
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
|
||||
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
|
||||
.expectHeader()
|
||||
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
|
||||
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
|
||||
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST"));
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public class WebFluxEndpointIntegrationTests extends
|
||||
Environment environment, WebEndpointDiscoverer endpointDiscoverer,
|
||||
EndpointMediaTypes endpointMediaTypes) {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
|
||||
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
|
||||
return new WebFluxEndpointHandlerMapping(
|
||||
new EndpointMapping(environment.getProperty("endpointPath")),
|
||||
|
||||
@@ -88,9 +88,9 @@ public class MvcWebEndpointIntegrationTests extends
|
||||
load(TestEndpointConfiguration.class, (client) -> client.options().uri("/test")
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.header("Access-Control-Request-Method", "POST")
|
||||
.header("Origin", "http://example.com").exchange().expectStatus().isOk()
|
||||
.header("Origin", "https://example.com").exchange().expectStatus().isOk()
|
||||
.expectHeader()
|
||||
.valueEquals("Access-Control-Allow-Origin", "http://example.com")
|
||||
.valueEquals("Access-Control-Allow-Origin", "https://example.com")
|
||||
.expectHeader().valueEquals("Access-Control-Allow-Methods", "GET,POST"));
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class MvcWebEndpointIntegrationTests extends
|
||||
Environment environment, WebEndpointDiscoverer endpointDiscoverer,
|
||||
EndpointMediaTypes endpointMediaTypes) {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("http://example.com"));
|
||||
corsConfiguration.setAllowedOrigins(Arrays.asList("https://example.com"));
|
||||
corsConfiguration.setAllowedMethods(Arrays.asList("GET", "POST"));
|
||||
return new WebMvcEndpointHandlerMapping(
|
||||
new EndpointMapping(environment.getProperty("endpointPath")),
|
||||
|
||||
@@ -54,9 +54,9 @@ public class DefaultWebClientExchangeTagsProviderTests {
|
||||
public void setup() {
|
||||
this.request = ClientRequest
|
||||
.create(HttpMethod.GET,
|
||||
URI.create("http://example.org/projects/spring-boot"))
|
||||
URI.create("https://example.org/projects/spring-boot"))
|
||||
.attribute(URI_TEMPLATE_ATTRIBUTE,
|
||||
"http://example.org/projects/{project}")
|
||||
"https://example.org/projects/{project}")
|
||||
.build();
|
||||
this.response = mock(ClientResponse.class);
|
||||
given(this.response.statusCode()).willReturn(HttpStatus.OK);
|
||||
@@ -73,7 +73,7 @@ public class DefaultWebClientExchangeTagsProviderTests {
|
||||
@Test
|
||||
public void tagsWhenNoUriTemplateShouldProvideUriPath() {
|
||||
ClientRequest request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.org/projects/spring-boot")).build();
|
||||
URI.create("https://example.org/projects/spring-boot")).build();
|
||||
Iterable<Tag> tags = this.tagsProvider.tags(request, this.response, null);
|
||||
assertThat(tags).containsExactlyInAnyOrder(Tag.of("method", "GET"),
|
||||
Tag.of("uri", "/projects/spring-boot"),
|
||||
|
||||
@@ -71,7 +71,7 @@ public class MetricsWebClientFilterFunctionTests {
|
||||
@Test
|
||||
public void filterShouldRecordTimer() {
|
||||
ClientRequest request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.com/projects/spring-boot")).build();
|
||||
URI.create("https://example.com/projects/spring-boot")).build();
|
||||
given(this.response.statusCode()).willReturn(HttpStatus.OK);
|
||||
this.filterFunction.filter(request, this.exchange).block(Duration.ofSeconds(30));
|
||||
assertThat(this.registry.get("http.client.requests")
|
||||
@@ -83,7 +83,7 @@ public class MetricsWebClientFilterFunctionTests {
|
||||
public void filterWhenUriTemplatePresentShouldRecordTimer() {
|
||||
ClientRequest request = ClientRequest
|
||||
.create(HttpMethod.GET,
|
||||
URI.create("http://example.com/projects/spring-boot"))
|
||||
URI.create("https://example.com/projects/spring-boot"))
|
||||
.attribute(URI_TEMPLATE_ATTRIBUTE, "/projects/{project}").build();
|
||||
given(this.response.statusCode()).willReturn(HttpStatus.OK);
|
||||
this.filterFunction.filter(request, this.exchange).block(Duration.ofSeconds(30));
|
||||
@@ -95,7 +95,7 @@ public class MetricsWebClientFilterFunctionTests {
|
||||
@Test
|
||||
public void filterWhenIoExceptionThrownShouldRecordTimer() {
|
||||
ClientRequest request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.com/projects/spring-boot")).build();
|
||||
URI.create("https://example.com/projects/spring-boot")).build();
|
||||
ExchangeFunction errorExchange = (r) -> Mono.error(new IOException());
|
||||
this.filterFunction.filter(request, errorExchange)
|
||||
.onErrorResume(IOException.class, (t) -> Mono.empty())
|
||||
@@ -110,7 +110,7 @@ public class MetricsWebClientFilterFunctionTests {
|
||||
@Test
|
||||
public void filterWhenExceptionThrownShouldRecordTimer() {
|
||||
ClientRequest request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.com/projects/spring-boot")).build();
|
||||
URI.create("https://example.com/projects/spring-boot")).build();
|
||||
ExchangeFunction exchange = (r) -> Mono.error(new IllegalArgumentException());
|
||||
this.filterFunction.filter(request, exchange)
|
||||
.onErrorResume(IllegalArgumentException.class, (t) -> Mono.empty())
|
||||
@@ -124,7 +124,7 @@ public class MetricsWebClientFilterFunctionTests {
|
||||
@Test
|
||||
public void filterWhenExceptionAndRetryShouldNotCumulateRecordTime() {
|
||||
ClientRequest request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.com/projects/spring-boot")).build();
|
||||
URI.create("https://example.com/projects/spring-boot")).build();
|
||||
ExchangeFunction exchange = (r) -> Mono.error(new IllegalArgumentException())
|
||||
.delaySubscription(Duration.ofMillis(300)).cast(ClientResponse.class);
|
||||
this.filterFunction.filter(request, exchange).retry(1)
|
||||
|
||||
@@ -52,9 +52,9 @@ public class WebClientExchangeTagsTests {
|
||||
public void setup() {
|
||||
this.request = ClientRequest
|
||||
.create(HttpMethod.GET,
|
||||
URI.create("http://example.org/projects/spring-boot"))
|
||||
URI.create("https://example.org/projects/spring-boot"))
|
||||
.attribute(URI_TEMPLATE_ATTRIBUTE,
|
||||
"http://example.org/projects/{project}")
|
||||
"https://example.org/projects/{project}")
|
||||
.build();
|
||||
this.response = mock(ClientResponse.class);
|
||||
given(this.response.statusCode()).willReturn(HttpStatus.OK);
|
||||
@@ -76,7 +76,7 @@ public class WebClientExchangeTagsTests {
|
||||
public void uriWhenRelativeTemplateIsAvailableShouldReturnTemplate() {
|
||||
this.request = ClientRequest
|
||||
.create(HttpMethod.GET,
|
||||
URI.create("http://example.org/projects/spring-boot"))
|
||||
URI.create("https://example.org/projects/spring-boot"))
|
||||
.attribute(URI_TEMPLATE_ATTRIBUTE, "/projects/{project}").build();
|
||||
assertThat(WebClientExchangeTags.uri(this.request))
|
||||
.isEqualTo(Tag.of("uri", "/projects/{project}"));
|
||||
@@ -85,7 +85,7 @@ public class WebClientExchangeTagsTests {
|
||||
@Test
|
||||
public void uriWhenTemplateIsMissingShouldReturnPath() {
|
||||
this.request = ClientRequest.create(HttpMethod.GET,
|
||||
URI.create("http://example.org/projects/spring-boot")).build();
|
||||
URI.create("https://example.org/projects/spring-boot")).build();
|
||||
assertThat(WebClientExchangeTags.uri(this.request))
|
||||
.isEqualTo(Tag.of("uri", "/projects/spring-boot"));
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.springframework.transaction.jta.JtaTransactionManager;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* JTA Configuration for <A href="http://www.atomikos.com/">Atomikos</a>.
|
||||
* JTA Configuration for <A href="https://www.atomikos.com/">Atomikos</a>.
|
||||
*
|
||||
* @author Josh Long
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -45,7 +45,7 @@ import org.springframework.transaction.jta.JtaTransactionManager;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* JTA Configuration for <A href="http://docs.codehaus.org/display/BTM/Home">Bitronix</A>.
|
||||
* JTA Configuration for <A href="https://github.com/bitronix/btm">Bitronix</A>.
|
||||
*
|
||||
* @author Josh Long
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -74,14 +74,14 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
ClientRegistration adapted = registrations.get("registration");
|
||||
ProviderDetails adaptedProvider = adapted.getProviderDetails();
|
||||
assertThat(adaptedProvider.getAuthorizationUri())
|
||||
.isEqualTo("http://example.com/auth");
|
||||
assertThat(adaptedProvider.getTokenUri()).isEqualTo("http://example.com/token");
|
||||
.isEqualTo("https://example.com/auth");
|
||||
assertThat(adaptedProvider.getTokenUri()).isEqualTo("https://example.com/token");
|
||||
UserInfoEndpoint userInfoEndpoint = adaptedProvider.getUserInfoEndpoint();
|
||||
assertThat(userInfoEndpoint.getUri()).isEqualTo("http://example.com/info");
|
||||
assertThat(userInfoEndpoint.getUri()).isEqualTo("https://example.com/info");
|
||||
assertThat(userInfoEndpoint.getAuthenticationMethod()).isEqualTo(
|
||||
org.springframework.security.oauth2.core.AuthenticationMethod.FORM);
|
||||
assertThat(userInfoEndpoint.getUserNameAttributeName()).isEqualTo("sub");
|
||||
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jwk");
|
||||
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("https://example.com/jwk");
|
||||
assertThat(adapted.getRegistrationId()).isEqualTo("registration");
|
||||
assertThat(adapted.getClientId()).isEqualTo("clientId");
|
||||
assertThat(adapted.getClientSecret()).isEqualTo("clientSecret");
|
||||
@@ -90,7 +90,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
assertThat(adapted.getAuthorizationGrantType()).isEqualTo(
|
||||
org.springframework.security.oauth2.core.AuthorizationGrantType.AUTHORIZATION_CODE);
|
||||
assertThat(adapted.getRedirectUriTemplate())
|
||||
.isEqualTo("http://example.com/redirect");
|
||||
.isEqualTo("https://example.com/redirect");
|
||||
assertThat(adapted.getScopes()).containsExactly("user");
|
||||
assertThat(adapted.getClientName()).isEqualTo("clientName");
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
assertThat(adapted.getAuthorizationGrantType()).isEqualTo(
|
||||
org.springframework.security.oauth2.core.AuthorizationGrantType.AUTHORIZATION_CODE);
|
||||
assertThat(adapted.getRedirectUriTemplate())
|
||||
.isEqualTo("http://example.com/redirect");
|
||||
.isEqualTo("https://example.com/redirect");
|
||||
assertThat(adapted.getScopes()).containsExactly("user");
|
||||
assertThat(adapted.getClientName()).isEqualTo("clientName");
|
||||
}
|
||||
@@ -271,23 +271,23 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
assertThat(adapted.getClientName()).isEqualTo(issuer);
|
||||
assertThat(adapted.getScopes()).containsOnly("user");
|
||||
assertThat(adapted.getRedirectUriTemplate())
|
||||
.isEqualTo("http://example.com/redirect");
|
||||
.isEqualTo("https://example.com/redirect");
|
||||
assertThat(providerDetails.getAuthorizationUri())
|
||||
.isEqualTo("http://example.com/auth");
|
||||
assertThat(providerDetails.getTokenUri()).isEqualTo("http://example.com/token");
|
||||
assertThat(providerDetails.getJwkSetUri()).isEqualTo("http://example.com/jwk");
|
||||
.isEqualTo("https://example.com/auth");
|
||||
assertThat(providerDetails.getTokenUri()).isEqualTo("https://example.com/token");
|
||||
assertThat(providerDetails.getJwkSetUri()).isEqualTo("https://example.com/jwk");
|
||||
UserInfoEndpoint userInfoEndpoint = providerDetails.getUserInfoEndpoint();
|
||||
assertThat(userInfoEndpoint.getUri()).isEqualTo("http://example.com/info");
|
||||
assertThat(userInfoEndpoint.getUri()).isEqualTo("https://example.com/info");
|
||||
assertThat(userInfoEndpoint.getUserNameAttributeName()).isEqualTo("sub");
|
||||
}
|
||||
|
||||
private Provider createProvider() {
|
||||
Provider provider = new Provider();
|
||||
provider.setAuthorizationUri("http://example.com/auth");
|
||||
provider.setTokenUri("http://example.com/token");
|
||||
provider.setUserInfoUri("http://example.com/info");
|
||||
provider.setAuthorizationUri("https://example.com/auth");
|
||||
provider.setTokenUri("https://example.com/token");
|
||||
provider.setUserInfoUri("https://example.com/info");
|
||||
provider.setUserNameAttribute("sub");
|
||||
provider.setJwkSetUri("http://example.com/jwk");
|
||||
provider.setJwkSetUri("https://example.com/jwk");
|
||||
return provider;
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
|
||||
registration.setClientId("clientId");
|
||||
registration.setClientSecret("clientSecret");
|
||||
registration.setClientAuthenticationMethod("post");
|
||||
registration.setRedirectUri("http://example.com/redirect");
|
||||
registration.setRedirectUri("https://example.com/redirect");
|
||||
registration.setScope(Collections.singleton("user"));
|
||||
registration.setAuthorizationGrantType("authorization_code");
|
||||
return registration;
|
||||
|
||||
@@ -168,7 +168,8 @@ public class ReactiveOAuth2ClientAutoConfigurationTests {
|
||||
@Bean
|
||||
public ReactiveClientRegistrationRepository clientRegistrationRepository() {
|
||||
List<ClientRegistration> registrations = new ArrayList<>();
|
||||
registrations.add(getClientRegistration("first", "http://user-info-uri.com"));
|
||||
registrations
|
||||
.add(getClientRegistration("first", "https://user-info-uri.com"));
|
||||
registrations.add(getClientRegistration("second", "http://other-user-info"));
|
||||
return new InMemoryReactiveClientRegistrationRepository(registrations);
|
||||
}
|
||||
@@ -180,9 +181,9 @@ public class ReactiveOAuth2ClientAutoConfigurationTests {
|
||||
org.springframework.security.oauth2.core.ClientAuthenticationMethod.BASIC)
|
||||
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
|
||||
.scope("read").clientSecret("secret")
|
||||
.redirectUriTemplate("http://redirect-uri.com")
|
||||
.authorizationUri("http://authorization-uri.com")
|
||||
.tokenUri("http://token-uri.com").userInfoUri(userInfoUri)
|
||||
.redirectUriTemplate("https://redirect-uri.com")
|
||||
.authorizationUri("https://authorization-uri.com")
|
||||
.tokenUri("https://token-uri.com").userInfoUri(userInfoUri)
|
||||
.userNameAttributeName("login");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -218,7 +218,8 @@ public class OAuth2WebSecurityConfigurationTests {
|
||||
@Bean
|
||||
public ClientRegistrationRepository clientRegistrationRepository() {
|
||||
List<ClientRegistration> registrations = new ArrayList<>();
|
||||
registrations.add(getClientRegistration("first", "http://user-info-uri.com"));
|
||||
registrations
|
||||
.add(getClientRegistration("first", "https://user-info-uri.com"));
|
||||
registrations.add(getClientRegistration("second", "http://other-user-info"));
|
||||
return new InMemoryClientRegistrationRepository(registrations);
|
||||
}
|
||||
@@ -230,9 +231,9 @@ public class OAuth2WebSecurityConfigurationTests {
|
||||
org.springframework.security.oauth2.core.ClientAuthenticationMethod.BASIC)
|
||||
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
|
||||
.scope("read").clientSecret("secret")
|
||||
.redirectUriTemplate("http://redirect-uri.com")
|
||||
.authorizationUri("http://authorization-uri.com")
|
||||
.tokenUri("http://token-uri.com").userInfoUri(userInfoUri)
|
||||
.redirectUriTemplate("https://redirect-uri.com")
|
||||
.authorizationUri("https://authorization-uri.com")
|
||||
.tokenUri("https://token-uri.com").userInfoUri(userInfoUri)
|
||||
.userNameAttributeName("login");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldConfigureResourceServer() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.run((context) -> {
|
||||
assertThat(context.getBean(ReactiveJwtDecoder.class))
|
||||
.isInstanceOf(NimbusReactiveJwtDecoder.class);
|
||||
@@ -110,8 +110,8 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationWhenBothSetUriAndIssuerUriPresentShouldUseSetUri() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com",
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=http://jwk-oidc-issuer-location.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com",
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=https://jwk-oidc-issuer-location.com")
|
||||
.run((context) -> {
|
||||
assertThat(context.getBean(ReactiveJwtDecoder.class))
|
||||
.isInstanceOf(NimbusReactiveJwtDecoder.class);
|
||||
@@ -130,7 +130,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void jwtDecoderBeanIsConditionalOnMissingBean() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.run((this::assertFilterConfiguredWithJwtAuthenticationManager));
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void jwtDecoderByIssuerUriBeanIsConditionalOnMissingBean() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=http://jwk-oidc-issuer-location.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=https://jwk-oidc-issuer-location.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.run((this::assertFilterConfiguredWithJwtAuthenticationManager));
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldBeConditionalOnBearerTokenAuthenticationTokenClass() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.withClassLoader(
|
||||
new FilteredClassLoader(BearerTokenAuthenticationToken.class))
|
||||
@@ -157,7 +157,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldBeConditionalOnReactiveJwtDecoderClass() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.withClassLoader(new FilteredClassLoader(ReactiveJwtDecoder.class))
|
||||
.run((context) -> assertThat(context)
|
||||
@@ -167,7 +167,7 @@ public class ReactiveOAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationWhenSecurityWebFilterChainConfigPresentShouldNotAddOne() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(SecurityWebFilterChainConfig.class)
|
||||
.run((context) -> {
|
||||
assertThat(context).hasSingleBean(SecurityWebFilterChain.class);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldConfigureResourceServer() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.run((context) -> {
|
||||
assertThat(context.getBean(JwtDecoder.class))
|
||||
.isInstanceOf(NimbusJwtDecoderJwkSupport.class);
|
||||
@@ -130,8 +130,8 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationWhenBothSetUriAndIssuerUriPresentShouldUseSetUri() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=http://issuer-uri.com",
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=https://issuer-uri.com",
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.run((context) -> {
|
||||
assertThat(context.getBean(JwtDecoder.class))
|
||||
.isInstanceOf(NimbusJwtDecoderJwkSupport.class);
|
||||
@@ -151,7 +151,7 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void jwtDecoderByJwkSetUriIsConditionalOnMissingBean() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.run((context) -> assertThat(getBearerTokenFilter(context)).isNotNull());
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void jwtDecoderByOidcIssuerUriIsConditionalOnMissingBean() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=http://jwk-oidc-issuer-location.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.issuer-uri=https://jwk-oidc-issuer-location.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.run((context) -> assertThat(getBearerTokenFilter(context)).isNotNull());
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldBeConditionalOnJwtAuthenticationTokenClass() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.withClassLoader(new FilteredClassLoader(JwtAuthenticationToken.class))
|
||||
.run((context) -> assertThat(getBearerTokenFilter(context)).isNull());
|
||||
@@ -176,7 +176,7 @@ public class OAuth2ResourceServerAutoConfigurationTests {
|
||||
@Test
|
||||
public void autoConfigurationShouldBeConditionalOnJwtDecoderClass() {
|
||||
this.contextRunner.withPropertyValues(
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://jwk-set-uri.com")
|
||||
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=https://jwk-set-uri.com")
|
||||
.withUserConfiguration(JwtDecoderConfig.class)
|
||||
.withClassLoader(new FilteredClassLoader(JwtDecoder.class))
|
||||
.run((context) -> assertThat(getBearerTokenFilter(context)).isNull());
|
||||
|
||||
@@ -101,23 +101,23 @@ public class WebClientAutoConfigurationTests {
|
||||
WebClient.Builder firstBuilder = context
|
||||
.getBean(WebClient.Builder.class);
|
||||
firstBuilder.clientConnector(firstConnector)
|
||||
.baseUrl("http://first.example.org");
|
||||
.baseUrl("https://first.example.org");
|
||||
ClientHttpConnector secondConnector = mock(ClientHttpConnector.class);
|
||||
given(secondConnector.connect(any(), any(), any()))
|
||||
.willReturn(Mono.just(response));
|
||||
WebClient.Builder secondBuilder = context
|
||||
.getBean(WebClient.Builder.class);
|
||||
secondBuilder.clientConnector(secondConnector)
|
||||
.baseUrl("http://second.example.org");
|
||||
.baseUrl("https://second.example.org");
|
||||
assertThat(firstBuilder).isNotEqualTo(secondBuilder);
|
||||
firstBuilder.build().get().uri("/foo").exchange()
|
||||
.block(Duration.ofSeconds(30));
|
||||
secondBuilder.build().get().uri("/foo").exchange()
|
||||
.block(Duration.ofSeconds(30));
|
||||
verify(firstConnector).connect(eq(HttpMethod.GET),
|
||||
eq(URI.create("http://first.example.org/foo")), any());
|
||||
eq(URI.create("https://first.example.org/foo")), any());
|
||||
verify(secondConnector).connect(eq(HttpMethod.GET),
|
||||
eq(URI.create("http://second.example.org/foo")), any());
|
||||
eq(URI.create("https://second.example.org/foo")), any());
|
||||
WebClientCustomizer customizer = context
|
||||
.getBean("webClientCustomizer", WebClientCustomizer.class);
|
||||
verify(customizer, times(1)).customize(any(WebClient.Builder.class));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<html xmlns:th="https://www.thymeleaf.org" xmlns:layout="https://github.com/ultraq/thymeleaf-layout-dialect">
|
||||
<head>
|
||||
<title layout:fragment="title">Layout</title>
|
||||
</head>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="layout">
|
||||
<html xmlns:th="https://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="layout">
|
||||
<head>
|
||||
<title layout:fragment="title">Content</title>
|
||||
</head>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="binding" type="tns:portType">
|
||||
<wsdlsoap:binding style="document"
|
||||
transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
transport="http://schemas.xmlsoap.org/soap/http/" />
|
||||
<wsdl:operation name="operation">
|
||||
<wsdlsoap:operation soapAction="" />
|
||||
<wsdl:input name="request">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@GrabResolver(name='clojars.org', root='http://clojars.org/repo')
|
||||
@GrabResolver(name='clojars.org', root='https://clojars.org/repo')
|
||||
@Grab('redis.embedded:embedded-redis:0.2')
|
||||
|
||||
@Component
|
||||
|
||||
@@ -205,7 +205,7 @@ limitations under the License
|
||||
>>> CGLIB 3.0 (cglib:cglib:3.0):
|
||||
|
||||
Per the LICENSE file in the CGLIB JAR distribution downloaded from
|
||||
http://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
|
||||
https://sourceforge.net/projects/cglib/files/cglib3/3.0/cglib-3.0.jar/download,
|
||||
CGLIB 3.0 is licensed under the Apache License, version 2.0, the text of which
|
||||
is included above.
|
||||
|
||||
@@ -225,7 +225,7 @@ Eclipse Public License, Version 1.0 is applicable to the following component(s).
|
||||
The Eclipse Foundation makes available all content in this plug-in ("Content").
|
||||
Unless otherwise indicated below, the Content is provided to you under the terms
|
||||
and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the
|
||||
EPL is available at http://www.eclipse.org/legal/epl-v10.html.
|
||||
EPL is available at https://www.eclipse.org/legal/epl-v10.html.
|
||||
|
||||
For purposes of the EPL, "Program" will mean the Content.
|
||||
|
||||
@@ -235,7 +235,7 @@ terms and conditions may apply to your use of any object code in the Content.
|
||||
Check the Redistributor's license that was provided with the Content. If no such
|
||||
license exists, contact the Redistributor. Unless otherwise indicated below, the
|
||||
terms and conditions of the EPL still apply to any source code in the Content and
|
||||
such source code may be obtained at http://www.eclipse.org/
|
||||
such source code may be obtained at https://www.eclipse.org/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import org.eclipse.aether.util.filter.DependencyFilterUtils;
|
||||
|
||||
/**
|
||||
* A {@link GrapeEngine} implementation that uses
|
||||
* <a href="http://eclipse.org/aether">Aether</a>, the dependency resolution system used
|
||||
* <a href="https://eclipse.org/aether">Aether</a>, the dependency resolution system used
|
||||
* by Maven.
|
||||
*
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -54,7 +54,7 @@ public class AetherGrapeEngineTests {
|
||||
RepositoryConfiguration... additionalRepositories) {
|
||||
List<RepositoryConfiguration> repositoryConfigurations = new ArrayList<>();
|
||||
repositoryConfigurations.add(new RepositoryConfiguration("central",
|
||||
URI.create("https://repo.maven.apache.org/maven2"), false));
|
||||
URI.create("https://repo1.maven.org/maven2"), false));
|
||||
repositoryConfigurations.addAll(Arrays.asList(additionalRepositories));
|
||||
DependencyResolutionContext dependencyResolutionContext = new DependencyResolutionContext();
|
||||
dependencyResolutionContext.addDependencyManagement(
|
||||
@@ -143,7 +143,7 @@ public class AetherGrapeEngineTests {
|
||||
Map<String, Object> args = new HashMap<>();
|
||||
AetherGrapeEngine grapeEngine = this.createGrapeEngine();
|
||||
grapeEngine
|
||||
.addResolver(createResolver("restlet.org", "http://maven.restlet.org"));
|
||||
.addResolver(createResolver("restlet.org", "https://maven.restlet.org"));
|
||||
grapeEngine.grab(args, createDependency("org.restlet", "org.restlet", "1.1.6"));
|
||||
assertThat(this.groovyClassLoader.getURLs().length).isEqualTo(1);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public final class DetailedProgressReporterTests {
|
||||
|
||||
private static final String REPOSITORY = "http://my.repository.com/";
|
||||
private static final String REPOSITORY = "https://repo.example.com/";
|
||||
|
||||
private static final String ARTIFACT = "org/alpha/bravo/charlie/1.2.3/charlie-1.2.3.jar";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -96,7 +96,7 @@ public class SettingsXmlRepositorySystemSessionAutoConfigurationTests {
|
||||
return null;
|
||||
});
|
||||
RemoteRepository repository = new RemoteRepository.Builder("my-server", "default",
|
||||
"http://maven.example.com").build();
|
||||
"https://maven.example.com").build();
|
||||
assertMirrorSelectorConfiguration(session, repository);
|
||||
assertProxySelectorConfiguration(session, repository);
|
||||
assertAuthenticationSelectorConfiguration(session, repository);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="
|
||||
http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<html xmlns:th="https://www.thymeleaf.org">
|
||||
<head>
|
||||
<title th:text="${title}">Title</title>
|
||||
<link rel="stylesheet" th:href="@{/resources/css/bootstrap.min.css}"
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="container">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="http://www.thymeleaf.org"> Thymeleaf -
|
||||
<a class="brand" href="https://www.thymeleaf.org"> Thymeleaf -
|
||||
Plain </a>
|
||||
<ul class="nav">
|
||||
<li><a th:href="@{/}" href="home.html"> Home </a></li>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
|
||||
exclude-result-prefixes="m">
|
||||
<xsl:output method="xml" encoding="utf-8" indent="yes"
|
||||
xslt:indent-amount="4" xmlns:xslt="http://xml.apache.org/xslt" />
|
||||
xslt:indent-amount="4" xmlns:xslt="https://xml.apache.org/xslt" />
|
||||
<xsl:strip-space elements="*" />
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
|
||||
@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A server that can be used to tunnel TCP traffic over HTTP. Similar in design to the
|
||||
* <a href="http://xmpp.org/extensions/xep-0124.html">Bidirectional-streams Over
|
||||
* <a href="https://xmpp.org/extensions/xep-0124.html">Bidirectional-streams Over
|
||||
* Synchronous HTTP (BOSH)</a> XMPP extension protocol, the server uses long polling with
|
||||
* HTTP requests held open until a response is available. A typical traffic pattern would
|
||||
* be as follows:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -59,7 +59,7 @@ public class ChangeableUrlsTests {
|
||||
|
||||
@Test
|
||||
public void httpUrl() throws Exception {
|
||||
URL url = new URL("http://spring.io");
|
||||
URL url = new URL("https://spring.io");
|
||||
assertThat(ChangeableUrls.fromUrls(url)).isEmpty();
|
||||
}
|
||||
|
||||
|
||||
@@ -330,6 +330,6 @@ following alternatives:
|
||||
|
||||
* https://maven.apache.org/plugins/maven-shade-plugin/[Maven Shade Plugin]
|
||||
* http://www.jdotsoft.com/JarClassLoader.php[JarClassLoader]
|
||||
* http://one-jar.sourceforge.net[OneJar]
|
||||
* https://sourceforge.net/projects/one-jar/[OneJar]
|
||||
* https://imperceptiblethoughts.com/shadow/[Gradle Shadow Plugin]
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ section of your `pom.xml`, as shown in the following example:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- ... -->
|
||||
<build>
|
||||
@@ -109,7 +109,7 @@ the usual `packaging` element, as shown in the following example:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!-- ... -->
|
||||
<packaging>jar</packaging>
|
||||
<!-- ... -->
|
||||
@@ -138,7 +138,7 @@ following example:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<!-- ... -->
|
||||
<packaging>war</packaging>
|
||||
<!-- ... -->
|
||||
@@ -367,7 +367,7 @@ If your archive already includes libraries, you can use `Libraries.NONE`.
|
||||
[[build-tool-plugins-find-a-main-class]]
|
||||
=== Finding a Main Class
|
||||
If you do not use `Repackager.setMainClass()` to specify a main class, the repackager
|
||||
uses http://asm.ow2.org/[ASM] to read class files and tries to find a suitable class with
|
||||
uses https://asm.ow2.org/[ASM] to read class files and tries to find a suitable class with
|
||||
a `public static void main(String[] args)` method. An exception is thrown if more than one
|
||||
candidate is found.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ using the `cf apps` command, as shown in the following example:
|
||||
|
||||
Once Cloud Foundry acknowledges that your application has been deployed, you should be
|
||||
able to find the application at the URI given. In the preceding example, you could find
|
||||
it at `\http://acloudyspringtime.cfapps.io/`.
|
||||
it at `\https://acloudyspringtime.cfapps.io/`.
|
||||
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ deployments is to `git push` the code to production, as shown in the following e
|
||||
Downloading: https://repo.spring.io/...
|
||||
Downloaded: https://repo.spring.io/... (818 B at 1.8 KB/sec)
|
||||
....
|
||||
Downloaded: http://s3pository.heroku.com/jvm/... (152 KB at 595.3 KB/sec)
|
||||
Downloaded: https://s3pository.heroku.com/jvm/... (152 KB at 595.3 KB/sec)
|
||||
[INFO] Installing /tmp/build_0c35a5d2-a067-4abc-a232-14b1fb7a8229/target/...
|
||||
[INFO] Installing /tmp/build_0c35a5d2-a067-4abc-a232-14b1fb7a8229/pom.xml ...
|
||||
[INFO] ------------------------------------------------------------------------
|
||||
@@ -219,7 +219,7 @@ deployments is to `git push` the code to production, as shown in the following e
|
||||
|
||||
-----> Compressing... *done*, 70.4MB
|
||||
-----> Launching... *done*, v6
|
||||
http://agile-sierra-1405.herokuapp.com/ *deployed to Heroku*
|
||||
https://agile-sierra-1405.herokuapp.com/ *deployed to Heroku*
|
||||
|
||||
To git@heroku.com:agile-sierra-1405.git
|
||||
* [new branch] master -> master
|
||||
@@ -373,11 +373,11 @@ example:
|
||||
Creating security group boxfuse-sg_axelfontaine/myapp:1.0 ...
|
||||
Launching t2.micro instance of axelfontaine/myapp:1.0 (ami-d23f38cf) in eu-central-1 ...
|
||||
Instance launched in 00:30.306s -> i-92ef9f53
|
||||
Waiting for AWS to boot Instance i-92ef9f53 and Payload to start at http://52.28.235.61/ ...
|
||||
Payload started in 00:29.266s -> http://52.28.235.61/
|
||||
Waiting for AWS to boot Instance i-92ef9f53 and Payload to start at https://52.28.235.61/ ...
|
||||
Payload started in 00:29.266s -> https://52.28.235.61/
|
||||
Remapping Elastic IP 52.28.233.167 to i-92ef9f53 ...
|
||||
Waiting 15s for AWS to complete Elastic IP Zero Downtime transition ...
|
||||
Deployment completed successfully. axelfontaine/myapp:1.0 is up and running at http://myapp-axelfontaine.boxfuse.io/
|
||||
Deployment completed successfully. axelfontaine/myapp:1.0 is up and running at https://myapp-axelfontaine.boxfuse.io/
|
||||
----
|
||||
|
||||
Your application should now be up and running on AWS.
|
||||
@@ -644,7 +644,7 @@ the `run` command is used by default.
|
||||
Note that, unlike when running as an `init.d` service, the user that runs the application,
|
||||
the PID file, and the console log file are managed by `systemd` itself and therefore must
|
||||
be configured by using appropriate fields in the '`service`' script. Consult the
|
||||
http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
configuration man page] for more details.
|
||||
|
||||
To flag the application to start automatically on system boot, use the following command:
|
||||
@@ -842,7 +842,7 @@ If it is not a symlink or you want to explicitly set the app name, this can be u
|
||||
NOTE: The `PID_FOLDER`, `LOG_FOLDER`, and `LOG_FILENAME` variables are only valid for an
|
||||
`init.d` service. For `systemd`, the equivalent customizations are made by using the
|
||||
'`service`' script. See the
|
||||
http://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit
|
||||
configuration man page] for more details.
|
||||
|
||||
[[deployment-script-customization-conf-file]]
|
||||
|
||||
@@ -131,7 +131,7 @@ The following listing shows a typical `pom.xml` file:
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
@@ -259,7 +259,7 @@ classpath is set correctly).
|
||||
==== Installation with SDKMAN!
|
||||
SDKMAN! (The Software Development Kit Manager) can be used for managing multiple versions
|
||||
of various binary SDKs, including Groovy and the Spring Boot CLI.
|
||||
Get SDKMAN! from http://sdkman.io and install Spring Boot by using the following
|
||||
Get SDKMAN! from https://sdkman.io and install Spring Boot by using the following
|
||||
commands:
|
||||
|
||||
[indent=0,subs="verbatim,quotes,attributes"]
|
||||
@@ -307,7 +307,7 @@ You can see it by running the following command:
|
||||
|
||||
[[getting-started-homebrew-cli-installation]]
|
||||
==== OSX Homebrew Installation
|
||||
If you are on a Mac and use http://brew.sh/[Homebrew], you can install the Spring Boot
|
||||
If you are on a Mac and use https://brew.sh/[Homebrew], you can install the Spring Boot
|
||||
CLI by using the following commands:
|
||||
|
||||
[indent=0]
|
||||
@@ -325,7 +325,7 @@ that case, run `brew update` and try again.
|
||||
|
||||
[[getting-started-macports-cli-installation]]
|
||||
==== MacPorts Installation
|
||||
If you are on a Mac and use http://www.macports.org/[MacPorts], you can install the
|
||||
If you are on a Mac and use https://www.macports.org/[MacPorts], you can install the
|
||||
Spring Boot CLI by using the following command:
|
||||
|
||||
[indent=0]
|
||||
@@ -360,7 +360,7 @@ completion scripts are automatically registered with your shell.
|
||||
|
||||
[[getting-started-scoop-cli-installation]]
|
||||
==== Windows Scoop Installation
|
||||
If you are on a Windows and use http://scoop.sh/[Scoop], you can install the Spring Boot
|
||||
If you are on a Windows and use https://scoop.sh/[Scoop], you can install the Spring Boot
|
||||
CLI by using the following commands:
|
||||
|
||||
[indent=0]
|
||||
@@ -501,7 +501,7 @@ used to build your project. Open your favorite text editor and add the following
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.example</groupId>
|
||||
|
||||
@@ -769,7 +769,7 @@ additional dependency.
|
||||
Spring Boot manages the version for the
|
||||
`io.netty:netty-tcnative-boringssl-static` "uber jar", containing native libraries for
|
||||
all platforms. Developers can choose to import only the required dependencies using
|
||||
a classifier (see http://netty.io/wiki/forked-tomcat-native.html[the Netty official
|
||||
a classifier (see https://netty.io/wiki/forked-tomcat-native.html[the Netty official
|
||||
documentation]).
|
||||
|
||||
|
||||
@@ -1502,7 +1502,7 @@ include::{code-examples}/web/client/RestTemplateProxyCustomizationExample.java[t
|
||||
|
||||
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which
|
||||
is typically provided by Spring Framework's `spring-jcl` module. To use
|
||||
http://logback.qos.ch[Logback], you need to include it and `spring-jcl` on the classpath.
|
||||
https://logback.qos.ch[Logback], you need to include it and `spring-jcl` on the classpath.
|
||||
The simplest way to do that is through the starters, which all depend on
|
||||
`spring-boot-starter-logging`. For a web application, you need only
|
||||
`spring-boot-starter-web`, since it depends transitively on the logging starter. If you
|
||||
@@ -1606,7 +1606,7 @@ following example:
|
||||
|
||||
[[howto-configure-log4j-for-logging]]
|
||||
=== Configure Log4j for Logging
|
||||
Spring Boot supports http://logging.apache.org/log4j/2.x[Log4j 2] for logging
|
||||
Spring Boot supports https://logging.apache.org/log4j/2.x[Log4j 2] for logging
|
||||
configuration if it is on the classpath. If you use the starters for
|
||||
assembling dependencies, you have to exclude Logback and then include log4j 2
|
||||
instead. If you do not use the starters, you need to provide (at least) `spring-jcl` in
|
||||
@@ -2290,7 +2290,7 @@ You can also switch off the initialization explicitly by setting
|
||||
[[howto-use-a-higher-level-database-migration-tool]]
|
||||
=== Use a Higher-level Database Migration Tool
|
||||
Spring Boot supports two higher-level migration tools: https://flywaydb.org/[Flyway]
|
||||
and http://www.liquibase.org/[Liquibase].
|
||||
and https://www.liquibase.org/[Liquibase].
|
||||
|
||||
[[howto-execute-flyway-database-migrations-on-startup]]
|
||||
==== Execute Flyway Database Migrations on Startup
|
||||
@@ -2683,7 +2683,7 @@ for other Groovy customization options.
|
||||
=== Fast Application Restarts
|
||||
The `spring-boot-devtools` module includes support for automatic application restarts.
|
||||
While not as fast as technologies such as
|
||||
http://zeroturnaround.com/software/jrebel/[JRebel] it is usually significantly faster than
|
||||
https://zeroturnaround.com/software/jrebel/[JRebel] it is usually significantly faster than
|
||||
a "`cold start`". You should probably give it a try before investigating some of the more
|
||||
complex reload options discussed later in this document.
|
||||
|
||||
@@ -3319,9 +3319,9 @@ rather than the version that was pre-installed with the server. You can do so by
|
||||
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
|
||||
https://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
|
||||
http://xmlns.oracle.com/weblogic/weblogic-web-app
|
||||
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
|
||||
https://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
|
||||
<wls:container-descriptor>
|
||||
<wls:prefer-application-packages>
|
||||
<wls:package-name>org.slf4j</wls:package-name>
|
||||
|
||||
@@ -491,7 +491,7 @@ configuration permits `GET` and `POST` calls from the `example.com` domain:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.endpoints.web.cors.allowed-origins=http://example.com
|
||||
management.endpoints.web.cors.allowed-origins=https://example.com
|
||||
management.endpoints.web.cors.allowed-methods=GET,POST
|
||||
----
|
||||
|
||||
@@ -1461,7 +1461,7 @@ https://github.com/Netflix/atlas[Atlas server] to use can be provided using:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.metrics.export.atlas.uri=http://atlas.example.com:7101/api/v1/publish
|
||||
management.metrics.export.atlas.uri=https://atlas.example.com:7101/api/v1/publish
|
||||
----
|
||||
|
||||
|
||||
@@ -1516,7 +1516,7 @@ using the following property:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.metrics.export.elastic.host=http://elastic.example.com:8086
|
||||
management.metrics.export.elastic.host=https://elastic.example.com:8086
|
||||
----
|
||||
|
||||
|
||||
@@ -1595,7 +1595,7 @@ server] to use can be provided using:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.metrics.export.influx.uri=http://influx.example.com:8086
|
||||
management.metrics.export.influx.uri=https://influx.example.com:8086
|
||||
----
|
||||
|
||||
|
||||
@@ -1638,7 +1638,7 @@ server] to use can be provided using:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
management.metrics.export.kairos.uri=http://kairosdb.example.com:8080/api/v1/datapoints
|
||||
management.metrics.export.kairos.uri=https://kairosdb.example.com:8080/api/v1/datapoints
|
||||
----
|
||||
|
||||
|
||||
@@ -2338,7 +2338,7 @@ include::{code-examples}/cloudfoundry/CloudFoundryCustomContextPathExample.java[
|
||||
== What to Read Next
|
||||
If you want to explore some of the concepts discussed in this chapter, you can take a
|
||||
look at the actuator {github-code}/spring-boot-samples[sample applications]. You also
|
||||
might want to read about graphing tools such as http://graphite.wikidot.com/[Graphite].
|
||||
might want to read about graphing tools such as https://graphite.wikidot.com/[Graphite].
|
||||
|
||||
Otherwise, you can continue on, to read about <<deployment.adoc#deployment, '`deployment
|
||||
options`'>> or jump ahead for some in-depth information about Spring Boot's
|
||||
|
||||
@@ -248,7 +248,7 @@ You can use `@DependencyManagementBom` anywhere that you can use `@Grab`. Howeve
|
||||
ensure consistent ordering of the dependency management, you can use
|
||||
`@DependencyManagementBom` at most once in your application. A useful source of dependency
|
||||
management (which is a superset of Spring Boot's dependency management) is the
|
||||
http://platform.spring.io/[Spring IO Platform], which you might include with the following
|
||||
https://platform.spring.io/[Spring IO Platform], which you might include with the following
|
||||
line:
|
||||
|
||||
[source,java,indent=0]
|
||||
@@ -422,7 +422,7 @@ following example:
|
||||
[[cli-groovy-beans-dsl]]
|
||||
== Developing Applications with the Groovy Beans DSL
|
||||
Spring Framework 4.0 has native support for a `beans{}` "`DSL`" (borrowed from
|
||||
http://grails.org/[Grails]), and you can embed bean definitions in your Groovy application
|
||||
https://grails.org/[Grails]), and you can embed bean definitions in your Groovy application
|
||||
scripts by using the same format. This is sometimes a good way to include external
|
||||
features like middleware declarations, as shown in the following example:
|
||||
|
||||
|
||||
@@ -700,10 +700,10 @@ https://www.vaultproject.io/[HashiCorp Vault].
|
||||
|
||||
[[boot-features-external-config-yaml]]
|
||||
=== Using YAML Instead of Properties
|
||||
http://yaml.org[YAML] is a superset of JSON and, as such, is a convenient format for
|
||||
https://yaml.org[YAML] is a superset of JSON and, as such, is a convenient format for
|
||||
specifying hierarchical configuration data. The `SpringApplication` class automatically
|
||||
supports YAML as an alternative to properties whenever you have the
|
||||
http://www.snakeyaml.org/[SnakeYAML] library on your classpath.
|
||||
https://bitbucket.org/asomov/snakeyaml[SnakeYAML] library on your classpath.
|
||||
|
||||
NOTE: If you use "`Starters`", SnakeYAML is automatically provided by
|
||||
`spring-boot-starter`.
|
||||
@@ -722,10 +722,10 @@ For example, consider the following YAML document:
|
||||
----
|
||||
environments:
|
||||
dev:
|
||||
url: http://dev.example.com
|
||||
url: https://dev.example.com
|
||||
name: Developer Setup
|
||||
prod:
|
||||
url: http://another.example.com
|
||||
url: https://another.example.com
|
||||
name: My Cool App
|
||||
----
|
||||
|
||||
@@ -733,9 +733,9 @@ The preceding example would be transformed into the following properties:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
environments.dev.url=http://dev.example.com
|
||||
environments.dev.url=https://dev.example.com
|
||||
environments.dev.name=Developer Setup
|
||||
environments.prod.url=http://another.example.com
|
||||
environments.prod.url=https://another.example.com
|
||||
environments.prod.name=My Cool App
|
||||
----
|
||||
|
||||
@@ -1705,12 +1705,12 @@ See "<<boot-features-external-config-profile-specific-properties>>" for details.
|
||||
|
||||
[[boot-features-logging]]
|
||||
== Logging
|
||||
Spring Boot uses http://commons.apache.org/logging[Commons Logging] for all internal
|
||||
Spring Boot uses https://commons.apache.org/logging[Commons Logging] for all internal
|
||||
logging but leaves the underlying log implementation open. Default configurations are
|
||||
provided for
|
||||
{java-javadoc}/java/util/logging/package-summary.html[Java Util
|
||||
Logging], http://logging.apache.org/log4j/2.x/[Log4J2], and
|
||||
http://logback.qos.ch/[Logback]. In each case, loggers are pre-configured to use console
|
||||
Logging], https://logging.apache.org/log4j/2.x/[Log4J2], and
|
||||
https://logback.qos.ch/[Logback]. In each case, loggers are pre-configured to use console
|
||||
output with optional file output also available.
|
||||
|
||||
By default, if you use the "`Starters`", Logback is used for logging. Appropriate Logback
|
||||
@@ -2081,7 +2081,7 @@ cannot use extensions in it. You need to either use `logback-spring.xml` or defi
|
||||
`logging.config` property.
|
||||
|
||||
WARNING: The extensions cannot be used with Logback's
|
||||
http://logback.qos.ch/manual/configuration.html#autoScan[configuration scanning]. If you
|
||||
https://logback.qos.ch/manual/configuration.html#autoScan[configuration scanning]. If you
|
||||
attempt to do so, making changes to the configuration file results in an error similar to
|
||||
one of the following being logged:
|
||||
|
||||
@@ -2578,7 +2578,7 @@ Spring Boot includes auto-configuration support for the following templating eng
|
||||
|
||||
* https://freemarker.apache.org/docs/[FreeMarker]
|
||||
* http://docs.groovy-lang.org/docs/next/html/documentation/template-engines.html#_the_markuptemplateengine[Groovy]
|
||||
* http://www.thymeleaf.org[Thymeleaf]
|
||||
* https://www.thymeleaf.org[Thymeleaf]
|
||||
* https://mustache.github.io/[Mustache]
|
||||
|
||||
TIP: If possible, JSPs should be avoided. There are several
|
||||
@@ -2793,7 +2793,7 @@ described earlier.
|
||||
==== CORS Support
|
||||
|
||||
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing[Cross-origin resource sharing]
|
||||
(CORS) is a http://www.w3.org/TR/cors/[W3C specification] implemented by
|
||||
(CORS) is a https://www.w3.org/TR/cors/[W3C specification] implemented by
|
||||
https://caniuse.com/#feat=cors[most browsers] that lets you specify in a flexible
|
||||
way what kind of cross-domain requests are authorized, instead of using some less secure
|
||||
and less powerful approaches such as IFRAME or JSONP.
|
||||
@@ -2831,7 +2831,7 @@ defined by registering a `WebMvcConfigurer` bean with a customized
|
||||
|
||||
Spring WebFlux is the new reactive web framework introduced in Spring Framework 5.0.
|
||||
Unlike Spring MVC, it does not require the Servlet API, is fully asynchronous and
|
||||
non-blocking, and implements the http://www.reactive-streams.org/[Reactive Streams]
|
||||
non-blocking, and implements the https://www.reactive-streams.org/[Reactive Streams]
|
||||
specification through https://projectreactor.io/[the Reactor project].
|
||||
|
||||
Spring WebFlux comes in two flavors: functional and annotation-based. The
|
||||
@@ -3008,8 +3008,8 @@ Thymeleaf, FreeMarker, and Mustache.
|
||||
Spring Boot includes auto-configuration support for the following templating engines:
|
||||
|
||||
* https://freemarker.apache.org/docs/[FreeMarker]
|
||||
* http://www.thymeleaf.org[Thymeleaf]
|
||||
* http://mustache.github.io/[Mustache]
|
||||
* https://www.thymeleaf.org[Thymeleaf]
|
||||
* https://mustache.github.io/[Mustache]
|
||||
|
||||
When you use one of these templating engines with the default configuration, your
|
||||
templates are picked up automatically from `src/main/resources/templates`.
|
||||
@@ -3130,7 +3130,7 @@ does so, the orders shown in the following table will be used:
|
||||
=== JAX-RS and Jersey
|
||||
If you prefer the JAX-RS programming model for REST endpoints, you can use one of the
|
||||
available implementations instead of Spring MVC. https://jersey.github.io/[Jersey] and
|
||||
http://cxf.apache.org/[Apache CXF] work quite well out of the box. CXF requires you to
|
||||
https://cxf.apache.org/[Apache CXF] work quite well out of the box. CXF requires you to
|
||||
register its `Servlet` or `Filter` as a `@Bean` in your application context. Jersey has
|
||||
some native Spring support, so we also provide auto-configuration support for it in
|
||||
Spring Boot, together with a starter.
|
||||
@@ -3201,10 +3201,11 @@ that you can see how to set things up.
|
||||
|
||||
[[boot-features-embedded-container]]
|
||||
=== Embedded Servlet Container Support
|
||||
Spring Boot includes support for embedded http://tomcat.apache.org/[Tomcat],
|
||||
https://www.eclipse.org/jetty/[Jetty], and http://undertow.io/[Undertow] servers. Most
|
||||
developers use the appropriate "`Starter`" to obtain a fully configured instance. By
|
||||
default, the embedded server listens for HTTP requests on port `8080`.
|
||||
Spring Boot includes support for embedded https://tomcat.apache.org/[Tomcat],
|
||||
https://www.eclipse.org/jetty/[Jetty], and
|
||||
https://github.com/undertow-io/undertow[Undertow] servers. Most developers use the
|
||||
appropriate "`Starter`" to obtain a fully configured instance. By default, the embedded
|
||||
server listens for HTTP requests on port `8080`.
|
||||
|
||||
WARNING: If you choose to use Tomcat on https://www.centos.org/[CentOS], be aware that, by
|
||||
default, a temporary directory is used to store compiled JSPs, file uploads, and so on.
|
||||
@@ -3558,7 +3559,7 @@ You can register multiple OAuth2 clients and providers under the
|
||||
spring.security.oauth2.client.registration.my-client-1.client-name=Client for user scope
|
||||
spring.security.oauth2.client.registration.my-client-1.provider=my-oauth-provider
|
||||
spring.security.oauth2.client.registration.my-client-1.scope=user
|
||||
spring.security.oauth2.client.registration.my-client-1.redirect-uri-template=http://my-redirect-uri.com
|
||||
spring.security.oauth2.client.registration.my-client-1.redirect-uri-template=https://my-redirect-uri.com
|
||||
spring.security.oauth2.client.registration.my-client-1.client-authentication-method=basic
|
||||
spring.security.oauth2.client.registration.my-client-1.authorization-grant-type=authorization_code
|
||||
|
||||
@@ -3567,7 +3568,7 @@ You can register multiple OAuth2 clients and providers under the
|
||||
spring.security.oauth2.client.registration.my-client-2.client-name=Client for email scope
|
||||
spring.security.oauth2.client.registration.my-client-2.provider=my-oauth-provider
|
||||
spring.security.oauth2.client.registration.my-client-2.scope=email
|
||||
spring.security.oauth2.client.registration.my-client-2.redirect-uri-template=http://my-redirect-uri.com
|
||||
spring.security.oauth2.client.registration.my-client-2.redirect-uri-template=https://my-redirect-uri.com
|
||||
spring.security.oauth2.client.registration.my-client-2.client-authentication-method=basic
|
||||
spring.security.oauth2.client.registration.my-client-2.authorization-grant-type=authorization_code
|
||||
|
||||
@@ -3740,8 +3741,8 @@ application ends.
|
||||
TIP: The "`How-to`" section includes a <<howto.adoc#howto-database-initialization,
|
||||
section on how to initialize a database>>.
|
||||
|
||||
Spring Boot can auto-configure embedded http://www.h2database.com[H2],
|
||||
http://hsqldb.org/[HSQL], and http://db.apache.org/derby/[Derby] databases. You need not
|
||||
Spring Boot can auto-configure embedded https://www.h2database.com[H2],
|
||||
http://hsqldb.org/[HSQL], and https://db.apache.org/derby/[Derby] databases. You need not
|
||||
provide any connection URLs. You need only include a build dependency to the embedded
|
||||
database that you want to use.
|
||||
|
||||
@@ -3835,7 +3836,7 @@ settings by using their respective prefix (`+spring.datasource.hikari.*+`,
|
||||
documentation of the connection pool implementation you are using for more details.
|
||||
|
||||
For instance, if you use the
|
||||
http://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes[Tomcat
|
||||
https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html#Common_Attributes[Tomcat
|
||||
connection pool], you could customize many additional settings, as shown in the following
|
||||
example:
|
||||
|
||||
@@ -4101,8 +4102,8 @@ https://projects.spring.io/spring-data-jdbc/[reference documentation].
|
||||
|
||||
[[boot-features-sql-h2-console]]
|
||||
=== Using H2's Web Console
|
||||
The http://www.h2database.com[H2 database] provides a
|
||||
http://www.h2database.com/html/quickstart.html#h2_console[browser-based console] that
|
||||
The https://www.h2database.com[H2 database] provides a
|
||||
https://www.h2database.com/html/quickstart.html#h2_console[browser-based console] that
|
||||
Spring Boot can auto-configure for you. The console is auto-configured when the following
|
||||
conditions are met:
|
||||
|
||||
@@ -4129,8 +4130,8 @@ path by using the `spring.h2.console.path` property.
|
||||
|
||||
[[boot-features-jooq]]
|
||||
=== Using jOOQ
|
||||
Java Object Oriented Querying (http://www.jooq.org/[jOOQ]) is a popular product from
|
||||
http://www.datageekery.com/[Data Geekery] which generates Java code from your
|
||||
Java Object Oriented Querying (https://www.jooq.org/[jOOQ]) is a popular product from
|
||||
https://www.datageekery.com/[Data Geekery] which generates Java code from your
|
||||
database and lets you build type-safe SQL queries through its fluent API. Both the
|
||||
commercial and open source editions can be used with Spring Boot.
|
||||
|
||||
@@ -4263,7 +4264,7 @@ https://projects.spring.io/spring-data[projects.spring.io/spring-data].
|
||||
|
||||
[[boot-features-redis]]
|
||||
=== Redis
|
||||
http://redis.io/[Redis] is a cache, message broker, and richly-featured key-value store.
|
||||
https://redis.io/[Redis] is a cache, message broker, and richly-featured key-value store.
|
||||
Spring Boot offers basic auto-configuration for the
|
||||
https://github.com/lettuce-io/lettuce-core/[Lettuce] and
|
||||
https://github.com/xetorthio/jedis/[Jedis] client libraries and the abstractions on top
|
||||
@@ -4317,7 +4318,7 @@ get a pooled connection factory.
|
||||
|
||||
[[boot-features-mongodb]]
|
||||
=== MongoDB
|
||||
http://www.mongodb.com/[MongoDB] is an open-source NoSQL document database that uses a
|
||||
https://www.mongodb.com/[MongoDB] is an open-source NoSQL document database that uses a
|
||||
JSON-like schema instead of traditional table-based relational data. Spring Boot offers
|
||||
several conveniences for working with MongoDB, including the
|
||||
`spring-boot-starter-data-mongodb` and `spring-boot-starter-data-mongodb-reactive`
|
||||
@@ -4489,7 +4490,7 @@ customized by declaring a `DownloadConfigBuilderCustomizer` bean.
|
||||
|
||||
[[boot-features-neo4j]]
|
||||
=== Neo4j
|
||||
http://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data
|
||||
https://neo4j.com/[Neo4j] is an open-source NoSQL graph database that uses a rich data
|
||||
model of nodes connected by first class relationships, which is better suited for
|
||||
connected big data than traditional RDBMS approaches. Spring Boot offers several
|
||||
conveniences for working with Neo4j, including the `spring-boot-starter-data-neo4j`
|
||||
@@ -4646,7 +4647,7 @@ https://github.com/spring-projects/spring-data-gemfire/blob/master/src/main/java
|
||||
|
||||
[[boot-features-solr]]
|
||||
=== Solr
|
||||
http://lucene.apache.org/solr/[Apache Solr] is a search engine. Spring Boot offers basic
|
||||
https://lucene.apache.org/solr/[Apache Solr] is a search engine. Spring Boot offers basic
|
||||
auto-configuration for the Solr 5 client library and the abstractions on top of it
|
||||
provided by https://github.com/spring-projects/spring-data-solr[Spring Data Solr]. There
|
||||
is a `spring-boot-starter-data-solr` "`Starter`" for collecting the dependencies in a
|
||||
@@ -4710,7 +4711,6 @@ The transport client is still being used by
|
||||
https://github.com/spring-projects/spring-data-elasticsearch[Spring Data Elasticsearch],
|
||||
which you can start using with the `spring-boot-starter-data-elasticsearch` "`Starter`".
|
||||
|
||||
|
||||
[[boot-features-connecting-to-elasticsearch-rest]]
|
||||
==== Connecting to Elasticsearch by REST clients
|
||||
Elasticsearch ships
|
||||
@@ -4724,7 +4724,7 @@ You can further tune how `RestClient` is configured, as shown in the following e
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.elasticsearch.rest.uris=http://search.example.com:9200
|
||||
spring.elasticsearch.rest.uris=https://search.example.com:9200
|
||||
spring.elasticsearch.rest.username=user
|
||||
spring.elasticsearch.rest.password=secret
|
||||
----
|
||||
@@ -4746,7 +4746,7 @@ configured, as shown in the following example:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.elasticsearch.jest.uris=http://search.example.com:9200
|
||||
spring.elasticsearch.jest.uris=https://search.example.com:9200
|
||||
spring.elasticsearch.jest.read-timeout=10000
|
||||
spring.elasticsearch.jest.username=user
|
||||
spring.elasticsearch.jest.password=secret
|
||||
@@ -4817,7 +4817,7 @@ https://docs.spring.io/spring-data/elasticsearch/docs/[reference documentation].
|
||||
|
||||
[[boot-features-cassandra]]
|
||||
=== Cassandra
|
||||
http://cassandra.apache.org/[Cassandra] is an open source, distributed database
|
||||
https://cassandra.apache.org/[Cassandra] is an open source, distributed database
|
||||
management system designed to handle large amounts of data across many commodity servers.
|
||||
Spring Boot offers auto-configuration for Cassandra and the abstractions on top of it
|
||||
provided by https://github.com/spring-projects/spring-data-cassandra[Spring Data
|
||||
@@ -4878,7 +4878,7 @@ https://docs.spring.io/spring-data/cassandra/docs/[reference documentation].
|
||||
|
||||
[[boot-features-couchbase]]
|
||||
=== Couchbase
|
||||
http://www.couchbase.com/[Couchbase] is an open-source, distributed, multi-model NoSQL
|
||||
https://www.couchbase.com/[Couchbase] is an open-source, distributed, multi-model NoSQL
|
||||
document-oriented database that is optimized for interactive applications. Spring Boot
|
||||
offers auto-configuration for Couchbase and the abstractions on top of it provided by
|
||||
https://github.com/spring-projects/spring-data-couchbase[Spring Data Couchbase]. There are
|
||||
@@ -5122,7 +5122,7 @@ example:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.influx.url=http://172.0.0.1:8086
|
||||
spring.influx.url=https://172.0.0.1:8086
|
||||
----
|
||||
|
||||
If the connection to InfluxDB requires a user and password, you can set the
|
||||
@@ -5305,7 +5305,7 @@ abstraction expects. No further customization is applied to it.
|
||||
|
||||
[[boot-features-caching-provider-ehcache2]]
|
||||
==== EhCache 2.x
|
||||
http://www.ehcache.org/[EhCache] 2.x is used if a file named `ehcache.xml` can be found at
|
||||
https://www.ehcache.org/[EhCache] 2.x is used if a file named `ehcache.xml` can be found at
|
||||
the root of the classpath. If EhCache 2.x is found, the `EhCacheCacheManager` provided by
|
||||
the `spring-boot-starter-cache` "`Starter`" is used to bootstrap the cache manager. An
|
||||
alternate configuration file can be provided as well, as shown in the following example:
|
||||
@@ -5328,7 +5328,7 @@ Spring Boot has <<boot-features-hazelcast,general support for Hazelcast>>. If a
|
||||
|
||||
[[boot-features-caching-provider-infinispan]]
|
||||
==== Infinispan
|
||||
http://infinispan.org/[Infinispan] has no default configuration file location, so it must
|
||||
https://infinispan.org/[Infinispan] has no default configuration file location, so it must
|
||||
be specified explicitly. Otherwise, the default bootstrap is used.
|
||||
|
||||
[source,properties,indent=0]
|
||||
@@ -5404,7 +5404,7 @@ auto-configuration.
|
||||
|
||||
[[boot-features-caching-provider-redis]]
|
||||
==== Redis
|
||||
If http://redis.io/[Redis] is available and configured, a `RedisCacheManager` is
|
||||
If https://redis.io/[Redis] is available and configured, a `RedisCacheManager` is
|
||||
auto-configured. It is possible to create additional caches on startup by setting the
|
||||
`spring.cache.cache-names` property and cache defaults can be configured by using
|
||||
`spring.cache.redis.*` properties. For instance, the following configuration creates
|
||||
@@ -5516,7 +5516,7 @@ infrastructure to send and receive messages.
|
||||
|
||||
[[boot-features-activemq]]
|
||||
==== ActiveMQ Support
|
||||
When http://activemq.apache.org/[ActiveMQ] is available on the classpath, Spring Boot can
|
||||
When https://activemq.apache.org/[ActiveMQ] is available on the classpath, Spring Boot can
|
||||
also configure a `ConnectionFactory`. If the broker is present, an embedded broker is
|
||||
automatically started and configured (provided no broker URL is specified through
|
||||
configuration).
|
||||
@@ -5568,7 +5568,7 @@ are resolved against their provided names.
|
||||
[[boot-features-artemis]]
|
||||
==== Artemis Support
|
||||
Spring Boot can auto-configure a `ConnectionFactory` when it detects that
|
||||
http://activemq.apache.org/artemis/[Artemis] is available on the classpath. If the broker
|
||||
https://activemq.apache.org/artemis/[Artemis] is available on the classpath. If the broker
|
||||
is present, an embedded broker is automatically started and configured (unless the mode
|
||||
property has been explicitly set). The supported modes are `embedded` (to make explicit
|
||||
that an embedded broker is required and that an error should occur if the broker is not
|
||||
@@ -5936,7 +5936,7 @@ delivery attempts is reached.
|
||||
|
||||
[[boot-features-kafka]]
|
||||
=== Apache Kafka Support
|
||||
http://kafka.apache.org/[Apache Kafka] is supported by providing auto-configuration of
|
||||
https://kafka.apache.org/[Apache Kafka] is supported by providing auto-configuration of
|
||||
the `spring-kafka` project.
|
||||
|
||||
Kafka configuration is controlled by external configuration properties in
|
||||
@@ -6189,7 +6189,7 @@ The following code shows a typical example:
|
||||
private final WebClient webClient;
|
||||
|
||||
public MyService(WebClient.Builder webClientBuilder) {
|
||||
this.webClient = webClientBuilder.baseUrl("http://example.org").build();
|
||||
this.webClient = webClientBuilder.baseUrl("https://example.org").build();
|
||||
}
|
||||
|
||||
public Mono<Details> someRestCall(String name) {
|
||||
@@ -6317,7 +6317,7 @@ When a `jndi-name` is set, it takes precedence over all other Session-related se
|
||||
[[boot-features-jta]]
|
||||
== Distributed Transactions with JTA
|
||||
Spring Boot supports distributed JTA transactions across multiple XA resources by using
|
||||
either an http://www.atomikos.com/[Atomikos] or https://github.com/bitronix/btm[Bitronix]
|
||||
either an https://www.atomikos.com/[Atomikos] or https://github.com/bitronix/btm[Bitronix]
|
||||
embedded transaction manager. JTA transactions are also supported when deploying to a
|
||||
suitable Java EE Application Server.
|
||||
|
||||
@@ -6466,7 +6466,7 @@ configuration, as shown in the following example:
|
||||
Otherwise, Spring Boot tries to find the Hazelcast configuration from the default
|
||||
locations: `hazelcast.xml` in the working directory or at the root of the classpath. We
|
||||
also check if the `hazelcast.config` system property is set. See the
|
||||
http://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for
|
||||
https://docs.hazelcast.org/docs/latest/manual/html-single/[Hazelcast documentation] for
|
||||
more details.
|
||||
|
||||
If `hazelcast-client` is present on the classpath, Spring Boot first attempts to create a
|
||||
@@ -6487,7 +6487,7 @@ implementation.
|
||||
[[boot-features-quartz]]
|
||||
== Quartz Scheduler
|
||||
Spring Boot offers several conveniences for working with the
|
||||
http://www.quartz-scheduler.org/[Quartz scheduler], including the
|
||||
https://www.quartz-scheduler.org/[Quartz scheduler], including the
|
||||
`spring-boot-starter-quartz` "`Starter`". If Quartz is available, a `Scheduler` is
|
||||
auto-configured (through the `SchedulerFactoryBean` abstraction).
|
||||
|
||||
@@ -6718,13 +6718,13 @@ libraries.
|
||||
The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains
|
||||
the following provided libraries:
|
||||
|
||||
* http://junit.org[JUnit]: The de-facto standard for unit testing Java applications.
|
||||
* https://junit.org[JUnit]: The de-facto standard for unit testing Java applications.
|
||||
* {spring-reference}testing.html#integration-testing[Spring Test] & Spring Boot Test:
|
||||
Utilities and integration test support for Spring Boot applications.
|
||||
* http://joel-costigliola.github.io/assertj/[AssertJ]: A fluent assertion library.
|
||||
* http://hamcrest.org/JavaHamcrest/[Hamcrest]: A library of matcher objects (also known
|
||||
as constraints or predicates).
|
||||
* http://mockito.org/[Mockito]: A Java mocking framework.
|
||||
* https://joel-costigliola.github.io/assertj/[AssertJ]: A fluent assertion library.
|
||||
* https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also
|
||||
known as constraints or predicates).
|
||||
* https://mockito.github.io[Mockito]: A Java mocking framework.
|
||||
* https://github.com/skyscreamer/JSONassert[JSONassert]: An assertion library for JSON.
|
||||
* https://github.com/jayway/JsonPath[JsonPath]: XPath for JSON.
|
||||
|
||||
@@ -8157,7 +8157,7 @@ the following example:
|
||||
@Test
|
||||
public void testRequest() throws Exception {
|
||||
HttpHeaders headers = this.template.getForEntity(
|
||||
"http://myhost.example.com/example", String.class).getHeaders();
|
||||
"https://myhost.example.com/example", String.class).getHeaders();
|
||||
assertThat(headers.getLocation()).hasHost("other.example.com");
|
||||
}
|
||||
|
||||
@@ -8358,7 +8358,7 @@ annotations include:
|
||||
==== Class Conditions
|
||||
The `@ConditionalOnClass` and `@ConditionalOnMissingClass` annotations let
|
||||
`@Configuration` classes be included based on the presence or absence of specific classes.
|
||||
Due to the fact that annotation metadata is parsed by using http://asm.ow2.org/[ASM], you
|
||||
Due to the fact that annotation metadata is parsed by using https://asm.ow2.org/[ASM], you
|
||||
can use the `value` attribute to refer to the real class, even though that class might not
|
||||
actually appear on the running application classpath. You can also use the `name`
|
||||
attribute if you prefer to specify the class name by using a `String` value.
|
||||
@@ -8674,7 +8674,7 @@ The easiest way to start with Spring Boot and Kotlin is to follow
|
||||
https://spring.io/guides/tutorials/spring-boot-kotlin/[this comprehensive tutorial]. You
|
||||
can create new Kotlin projects via
|
||||
https://start.spring.io/#!language=kotlin[start.spring.io]. Feel free to join the #spring
|
||||
channel of http://slack.kotlinlang.org/[Kotlin Slack] or ask a question with the `spring`
|
||||
channel of https://slack.kotlinlang.org/[Kotlin Slack] or ask a question with the `spring`
|
||||
and `kotlin` tags on https://stackoverflow.com/questions/tagged/spring+kotlin[Stack
|
||||
Overflow] if you need support.
|
||||
|
||||
@@ -8709,7 +8709,7 @@ deals with `null` values at compile time rather than deferring the problem to ru
|
||||
encountering a `NullPointerException`. This helps to eliminate a common source of bugs
|
||||
without paying the cost of wrappers like `Optional`. Kotlin also allows using functional
|
||||
constructs with nullable values as described in this
|
||||
http://www.baeldung.com/kotlin-null-safety[comprehensive guide to null-safety in Kotlin].
|
||||
https://www.baeldung.com/kotlin-null-safety[comprehensive guide to null-safety in Kotlin].
|
||||
|
||||
Although Java does not allow one to express null-safety in its type system, Spring
|
||||
Framework, Spring Data, and Reactor now provide null-safety of their API via
|
||||
@@ -8852,7 +8852,7 @@ provides similar `@MockkBean` and `@SpykBean` annotations.
|
||||
[[boot-features-kotlin-resources-further-reading]]
|
||||
==== Further reading
|
||||
* {kotlin-documentation}[Kotlin language reference]
|
||||
* http://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel)
|
||||
* https://slack.kotlinlang.org/[Kotlin Slack] (with a dedicated #spring channel)
|
||||
* https://stackoverflow.com/questions/tagged/spring+kotlin[Stackoverflow with `spring` and `kotlin` tags]
|
||||
* https://try.kotlinlang.org/[Try Kotlin in your browser]
|
||||
* https://blog.jetbrains.com/kotlin/[Kotlin blog]
|
||||
|
||||
@@ -64,7 +64,7 @@ goal] with a `repackage` execution id.
|
||||
* Sensible
|
||||
https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html[resource
|
||||
filtering].
|
||||
* Sensible plugin configuration (http://www.mojohaus.org/exec-maven-plugin/[exec plugin],
|
||||
* Sensible plugin configuration (https://www.mojohaus.org/exec-maven-plugin/[exec plugin],
|
||||
https://github.com/ktoso/maven-git-commit-id-plugin[Git commit ID], and
|
||||
https://maven.apache.org/plugins/maven-shade-plugin/[shade]).
|
||||
* Sensible resource filtering for `application.properties` and `application.yml`
|
||||
|
||||
@@ -22,7 +22,7 @@ do as they were designed before this was clarified.
|
||||
|===
|
||||
| Name | Location
|
||||
|
||||
| http://camel.apache.org/spring-boot.html[Apache Camel]
|
||||
| https://camel.apache.org/spring-boot.html[Apache Camel]
|
||||
| https://github.com/apache/camel/tree/master/components/camel-spring-boot
|
||||
|
||||
| https://cxf.apache.org/docs/springboot.html[Apache CXF]
|
||||
@@ -31,13 +31,13 @@ do as they were designed before this was clarified.
|
||||
| https://qpid.apache.org/components/jms/[Apache Qpid]
|
||||
| https://github.com/amqphub/amqp-10-jms-spring-boot
|
||||
|
||||
| http://wicket.apache.org/[Apache Wicket]
|
||||
| https://wicket.apache.org/[Apache Wicket]
|
||||
| https://github.com/MarcGiffing/wicket-spring-boot
|
||||
|
||||
| http://arangodb.com/[ArangoDB]
|
||||
| https://arangodb.com/[ArangoDB]
|
||||
| https://github.com/arangodb/spring-boot-starter
|
||||
|
||||
| http://www.axonframework.org/[Axon Framework]
|
||||
| https://axoniq.io[Axon Framework]
|
||||
| https://github.com/AxonFramework/AxonFramework
|
||||
|
||||
| https://azure.microsoft.com/[Azure]
|
||||
@@ -58,7 +58,7 @@ do as they were designed before this was clarified.
|
||||
| https://cloudant.com/[Cloudant]
|
||||
| https://github.com/icha024/cloudant-spring-boot-starter
|
||||
|
||||
| http://www.couchbase.com/[Couchbase] HTTP session
|
||||
| https://www.couchbase.com/[Couchbase] HTTP session
|
||||
| https://github.com/mkopylec/session-couchbase-spring-boot-starter
|
||||
|
||||
| DataSource decorating (https://github.com/p6spy/p6spy[P6Spy], https://github.com/ttddyy/datasource-proxy[datasource-proxy], https://github.com/vladmihalcea/flexy-pool[FlexyPool])
|
||||
@@ -79,25 +79,25 @@ do as they were designed before this was clarified.
|
||||
| https://www.google.com/recaptcha[Google's reCAPTCHA]
|
||||
| https://github.com/mkopylec/recaptcha-spring-boot-starter
|
||||
|
||||
| http://graphql.org/[GraphQL] and https://github.com/graphql/graphiql[GraphiQL] with https://github.com/graphql-java/[GraphQL Java]
|
||||
| https://graphql.org/[GraphQL] and https://github.com/graphql/graphiql[GraphiQL] with https://github.com/graphql-java/[GraphQL Java]
|
||||
| https://github.com/graphql-java/graphql-spring-boot
|
||||
|
||||
| http://www.grpc.io/[gRPC]
|
||||
| https://www.grpc.io/[gRPC]
|
||||
| https://github.com/LogNet/grpc-spring-boot-starter
|
||||
|
||||
| http://ha-jdbc.github.io/[HA JDBC]
|
||||
| https://ha-jdbc.github.io/[HA JDBC]
|
||||
| https://github.com/lievendoclo/hajdbc-spring-boot
|
||||
|
||||
| https://github.com/jknack/handlebars.java[Handlebars]
|
||||
| https://github.com/allegro/handlebars-spring-boot-starter
|
||||
|
||||
| http://hdiv.org/[HDIV]
|
||||
| https://hdiv.org/[HDIV]
|
||||
| https://github.com/hdiv/spring-boot-starter-hdiv
|
||||
|
||||
| Hiatus for Spring Boot
|
||||
| https://github.com/jihor/hiatus-spring-boot
|
||||
|
||||
| http://infinispan.org/[Infinispan]
|
||||
| https://infinispan.org/[Infinispan]
|
||||
| https://github.com/infinispan/infinispan-spring-boot
|
||||
|
||||
| https://github.com/neuland/jade4j[Jade Templates] (Jade4J)
|
||||
@@ -113,36 +113,36 @@ do as they were designed before this was clarified.
|
||||
| https://github.com/sbraconnier/jodconverter
|
||||
|
||||
| JSF integration for various libraries
|
||||
| http://joinfaces.org
|
||||
| https://github.com/joinfaces/joinfaces
|
||||
|
||||
| http://www.liquigraph.org/[Liquigraph]
|
||||
| https://www.liquigraph.org/[Liquigraph]
|
||||
| https://github.com/liquigraph/liquigraph
|
||||
|
||||
| https://logback.qos.ch/access.html[Logback-access]
|
||||
| https://github.com/akihyro/logback-access-spring-boot-starter
|
||||
|
||||
| http://mybatis.org/mybatis-3/[MyBatis]
|
||||
| https://github.com/mybatis/mybatis-3[MyBatis]
|
||||
| https://github.com/mybatis/mybatis-spring-boot
|
||||
|
||||
| http://narayana.io/[Narayana]
|
||||
| https://github.com/jbosstm/narayana[Narayana]
|
||||
| https://github.com/snowdrop/narayana-spring-boot
|
||||
|
||||
| https://github.com/nutzam/nutz[Nutz]
|
||||
| https://github.com/nutzam/nutzmore
|
||||
|
||||
| http://square.github.io/okhttp/[OkHttp]
|
||||
| https://square.github.io/okhttp/[OkHttp]
|
||||
| https://github.com/freefair/okhttp-spring-boot
|
||||
|
||||
| https://developer.okta.com/[Okta]
|
||||
| https://github.com/okta/okta-spring-boot
|
||||
|
||||
| http://orika-mapper.github.io/orika-docs/[Orika]
|
||||
| https://orika-mapper.github.io/orika-docs/[Orika]
|
||||
| https://github.com/akihyro/orika-spring-boot-starter
|
||||
|
||||
| https://www.rabbitmq.com/[RabbitMQ] (Advanced usage)
|
||||
| https://github.com/societe-generale/rabbitmq-advanced-spring-boot-starter
|
||||
|
||||
| http://resteasy.jboss.org/[RESTEasy]
|
||||
| https://resteasy.jboss.org/[RESTEasy]
|
||||
| https://github.com/resteasy/resteasy-spring-boot
|
||||
|
||||
| https://github.com/rollbar/rollbar-java/[Rollbar]
|
||||
@@ -181,10 +181,10 @@ do as they were designed before this was clarified.
|
||||
| https://github.com/valiktor/valiktor[Valiktor]
|
||||
| https://github.com/valiktor/valiktor/tree/master/valiktor-spring/valiktor-spring-boot-starter
|
||||
|
||||
| http://www.wiremock.org[WireMock] and Spring REST Docs
|
||||
| https://github.com/tomakehurst/wiremock[WireMock] and Spring REST Docs
|
||||
| https://github.com/ePages-de/restdocs-wiremock
|
||||
|
||||
| http://alexo.github.io/wro4j/[Wro4j]
|
||||
| https://alexo.github.io/wro4j/[Wro4j] (Advanced usage)
|
||||
| https://github.com/michael-simons/wro4j-spring-boot-starter
|
||||
|
||||
|===
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://maven.apache.org/POM/4.0.0"
|
||||
exclude-result-prefixes="m">
|
||||
<xsl:output method="xml" encoding="utf-8" indent="yes"
|
||||
xslt:indent-amount="4" xmlns:xslt="http://xml.apache.org/xslt" />
|
||||
xslt:indent-amount="4" xmlns:xslt="https://xml.apache.org/xslt" />
|
||||
<xsl:strip-space elements="*" />
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:copy>
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AnotherExampleRestClient {
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
public AnotherExampleRestClient(RestTemplateBuilder builder) {
|
||||
this.restTemplate = builder.rootUri("http://example.com").build();
|
||||
this.restTemplate = builder.rootUri("https://example.com").build();
|
||||
}
|
||||
|
||||
protected RestTemplate getRestTemplate() {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ExampleRestClient {
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
public ExampleRestClient(RestTemplateBuilder builder) {
|
||||
this.restTemplate = builder.rootUri("http://example.com").build();
|
||||
this.restTemplate = builder.rootUri("https://example.com").build();
|
||||
}
|
||||
|
||||
protected RestTemplate getRestTemplate() {
|
||||
|
||||
@@ -36,7 +36,7 @@ class HateoasController {
|
||||
@RequestMapping("/resource")
|
||||
public EntityModel<Map<String, String>> resource() {
|
||||
return new EntityModel<>(new HashMap<>(),
|
||||
new Link("self", "http://api.example.com"));
|
||||
new Link("self", "https://api.example.com"));
|
||||
}
|
||||
|
||||
@RequestMapping("/plain")
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.web.util.UriTemplateHandler;
|
||||
* {@link RequestExpectationManager} that strips the specified root URI from the request
|
||||
* before verification. Can be used to simply test declarations when all REST calls start
|
||||
* the same way. For example: <pre class="code">
|
||||
* RestTemplate restTemplate = new RestTemplateBuilder().rootUri("http://example.com").build();
|
||||
* RestTemplate restTemplate = new RestTemplateBuilder().rootUri("https://example.com").build();
|
||||
* MockRestServiceServer server = RootUriRequestExpectationManager.bindTo(restTemplate);
|
||||
* server.expect(requestTo("/hello")).andRespond(withSuccess());
|
||||
* restTemplate.getForEntity("/hello", String.class);
|
||||
|
||||
@@ -826,7 +826,7 @@ public class TestRestTemplate {
|
||||
* {@link ParameterizedTypeReference} is used to pass generic type information:
|
||||
* <pre class="code">
|
||||
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
|
||||
* </pre>
|
||||
* @param url the URL
|
||||
* @param method the HTTP method (GET, POST, etc)
|
||||
@@ -854,7 +854,7 @@ public class TestRestTemplate {
|
||||
* {@link ParameterizedTypeReference} is used to pass generic type information:
|
||||
* <pre class="code">
|
||||
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
|
||||
* </pre>
|
||||
* @param url the URL
|
||||
* @param method the HTTP method (GET, POST, etc)
|
||||
@@ -882,7 +882,7 @@ public class TestRestTemplate {
|
||||
* {@link ParameterizedTypeReference} is used to pass generic type information:
|
||||
* <pre class="code">
|
||||
* ParameterizedTypeReference<List<MyBean>> myBean = new ParameterizedTypeReference<List<MyBean>>() {};
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("http://example.com",HttpMethod.GET, null, myBean);
|
||||
* ResponseEntity<List<MyBean>> response = template.exchange("https://example.com",HttpMethod.GET, null, myBean);
|
||||
* </pre>
|
||||
* @param url the URL
|
||||
* @param method the HTTP method (GET, POST, etc)
|
||||
@@ -908,7 +908,7 @@ public class TestRestTemplate {
|
||||
* response as {@link ResponseEntity}. Typically used in combination with the static
|
||||
* builder methods on {@code RequestEntity}, for instance: <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
|
||||
* RequestEntity request = RequestEntity.post(new URI("https://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
|
||||
* ResponseEntity<MyResponse> response = template.exchange(request, MyResponse.class);
|
||||
* </pre>
|
||||
* @param requestEntity the entity to write to the request
|
||||
@@ -929,7 +929,7 @@ public class TestRestTemplate {
|
||||
* response as {@link ResponseEntity}. The given {@link ParameterizedTypeReference} is
|
||||
* used to pass generic type information: <pre class="code">
|
||||
* MyRequest body = ...
|
||||
* RequestEntity request = RequestEntity.post(new URI("http://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
|
||||
* RequestEntity request = RequestEntity.post(new URI("https://example.com/foo")).accept(MediaType.APPLICATION_JSON).body(body);
|
||||
* ParameterizedTypeReference<List<MyResponse>> myBean = new ParameterizedTypeReference<List<MyResponse>>() {};
|
||||
* ResponseEntity<List<MyResponse>> response = template.exchange(request, myBean);
|
||||
* </pre>
|
||||
|
||||
@@ -101,7 +101,7 @@ public class LocalHostUriTemplateHandlerTests {
|
||||
MockEnvironment environment = new MockEnvironment();
|
||||
UriTemplateHandler uriTemplateHandler = mock(UriTemplateHandler.class);
|
||||
Map<String, ?> uriVariables = new HashMap<>();
|
||||
URI uri = URI.create("http://www.example.com");
|
||||
URI uri = URI.create("https://www.example.com");
|
||||
given(uriTemplateHandler.expand("https://localhost:8080/", uriVariables))
|
||||
.willReturn(uri);
|
||||
LocalHostUriTemplateHandler handler = new LocalHostUriTemplateHandler(environment,
|
||||
|
||||
@@ -74,7 +74,7 @@ public class MockServerRestTemplateCustomizerTests {
|
||||
MockServerRestTemplateCustomizer customizer = new MockServerRestTemplateCustomizer(
|
||||
UnorderedRequestExpectationManager.class);
|
||||
customizer.customize(
|
||||
new RestTemplateBuilder().rootUri("http://example.com").build());
|
||||
new RestTemplateBuilder().rootUri("https://example.com").build());
|
||||
assertThat(customizer.getServer()).extracting("expectationManager")
|
||||
.hasAtLeastOneElementOfType(RootUriRequestExpectationManager.class);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class MockServerRestTemplateCustomizerTests {
|
||||
public void setDetectRootUriShouldDisableRootUriDetection() {
|
||||
this.customizer.setDetectRootUri(false);
|
||||
this.customizer.customize(
|
||||
new RestTemplateBuilder().rootUri("http://example.com").build());
|
||||
new RestTemplateBuilder().rootUri("https://example.com").build());
|
||||
assertThat(this.customizer.getServer()).extracting("expectationManager")
|
||||
.hasAtLeastOneElementOfType(SimpleRequestExpectationManager.class);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -51,7 +51,7 @@ import static org.springframework.test.web.client.response.MockRestResponseCreat
|
||||
*/
|
||||
public class RootUriRequestExpectationManagerTests {
|
||||
|
||||
private String uri = "http://example.com";
|
||||
private String uri = "https://example.com";
|
||||
|
||||
@Mock
|
||||
private RequestExpectationManager delegate;
|
||||
@@ -94,7 +94,7 @@ public class RootUriRequestExpectationManagerTests {
|
||||
public void validateRequestWhenUriDoesNotStartWithRootUriShouldDelegateToExpectationManager()
|
||||
throws Exception {
|
||||
ClientHttpRequest request = mock(ClientHttpRequest.class);
|
||||
given(request.getURI()).willReturn(new URI("http://spring.io/test"));
|
||||
given(request.getURI()).willReturn(new URI("https://spring.io/test"));
|
||||
this.manager.validateRequest(request);
|
||||
verify(this.delegate).validateRequest(request);
|
||||
}
|
||||
@@ -118,10 +118,11 @@ public class RootUriRequestExpectationManagerTests {
|
||||
given(request.getURI()).willReturn(new URI(this.uri + "/hello"));
|
||||
given(this.delegate.validateRequest(any(ClientHttpRequest.class)))
|
||||
.willThrow(new AssertionError(
|
||||
"Request URI expected:</hello> was:<http://example.com/bad>"));
|
||||
"Request URI expected:</hello> was:<https://example.com/bad>"));
|
||||
assertThatExceptionOfType(AssertionError.class)
|
||||
.isThrownBy(() -> this.manager.validateRequest(request))
|
||||
.withMessageContaining("Request URI expected:<http://example.com/hello>");
|
||||
.withMessageContaining(
|
||||
"Request URI expected:<https://example.com/hello>");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -166,7 +167,7 @@ public class RootUriRequestExpectationManagerTests {
|
||||
@Test
|
||||
public void boundRestTemplateShouldPrefixRootUri() {
|
||||
RestTemplate restTemplate = new RestTemplateBuilder()
|
||||
.rootUri("http://example.com").build();
|
||||
.rootUri("https://example.com").build();
|
||||
MockRestServiceServer server = RootUriRequestExpectationManager
|
||||
.bindTo(restTemplate);
|
||||
server.expect(requestTo("/hello")).andRespond(withSuccess());
|
||||
@@ -176,14 +177,14 @@ public class RootUriRequestExpectationManagerTests {
|
||||
@Test
|
||||
public void boundRestTemplateWhenUrlIncludesDomainShouldNotPrefixRootUri() {
|
||||
RestTemplate restTemplate = new RestTemplateBuilder()
|
||||
.rootUri("http://example.com").build();
|
||||
.rootUri("https://example.com").build();
|
||||
MockRestServiceServer server = RootUriRequestExpectationManager
|
||||
.bindTo(restTemplate);
|
||||
server.expect(requestTo("/hello")).andRespond(withSuccess());
|
||||
assertThatExceptionOfType(AssertionError.class).isThrownBy(
|
||||
() -> restTemplate.getForEntity("http://spring.io/hello", String.class))
|
||||
() -> restTemplate.getForEntity("https://spring.io/hello", String.class))
|
||||
.withMessageContaining(
|
||||
"expected:<http://example.com/hello> but was:<http://spring.io/hello>");
|
||||
"expected:<https://example.com/hello> but was:<https://spring.io/hello>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,14 +125,14 @@ public class TestRestTemplateTests {
|
||||
|
||||
@Test
|
||||
public void getRootUriRootUriSetViaRestTemplateBuilder() {
|
||||
String rootUri = "http://example.com";
|
||||
String rootUri = "https://example.com";
|
||||
RestTemplateBuilder delegate = new RestTemplateBuilder().rootUri(rootUri);
|
||||
assertThat(new TestRestTemplate(delegate).getRootUri()).isEqualTo(rootUri);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getRootUriRootUriSetViaLocalHostUriTemplateHandler() {
|
||||
String rootUri = "http://example.com";
|
||||
String rootUri = "https://example.com";
|
||||
TestRestTemplate template = new TestRestTemplate();
|
||||
LocalHostUriTemplateHandler templateHandler = mock(
|
||||
LocalHostUriTemplateHandler.class);
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.boot.configurationprocessor.json;
|
||||
// Note: this class was written without inspecting the non-free org.json source code.
|
||||
|
||||
/**
|
||||
* Parses a JSON (<a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>) encoded
|
||||
* Parses a JSON (<a href="https://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>) encoded
|
||||
* string into the corresponding object. Most clients of this class will use only need the
|
||||
* {@link #JSONTokener(String) constructor} and {@link #nextValue} method. Example usage:
|
||||
* <pre>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -25,7 +25,7 @@ import org.springframework.boot.loader.data.RandomAccessData;
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @see <a href="http://en.wikipedia.org/wiki/Zip_%28file_format%29">Zip File Format</a>
|
||||
* @see <a href="https://en.wikipedia.org/wiki/Zip_%28file_format%29">Zip File Format</a>
|
||||
*/
|
||||
class CentralDirectoryEndRecord {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.boot.loader.data.RandomAccessData;
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Andy Wilkinson
|
||||
* @see <a href="http://en.wikipedia.org/wiki/Zip_%28file_format%29">Zip File Format</a>
|
||||
* @see <a href="https://en.wikipedia.org/wiki/Zip_%28file_format%29">Zip File Format</a>
|
||||
*/
|
||||
|
||||
final class CentralDirectoryFileHeader implements FileHeader {
|
||||
@@ -120,9 +120,9 @@ final class CentralDirectoryFileHeader implements FileHeader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode MS-DOS Date Time details. See
|
||||
* <a href="http://mindprod.com/jgloss/zip.html">mindprod.com/jgloss/zip.html</a> for
|
||||
* more details of the format.
|
||||
* Decode MS-DOS Date Time details. See <a href=
|
||||
* "https://docs.microsoft.com/en-gb/windows/desktop/api/winbase/nf-winbase-dosdatetimetofiletime">
|
||||
* Microsoft's documentation</a> for more details of the format.
|
||||
* @param datetime the date and time
|
||||
* @return the date and time as milliseconds since the epoch
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.apache.maven.plugins.shade.relocation.Relocator;
|
||||
import org.apache.maven.plugins.shade.resource.ResourceTransformer;
|
||||
|
||||
/**
|
||||
* Extension for the <a href="http://maven.apache.org/plugins/maven-shade-plugin/">Maven
|
||||
* Extension for the <a href="https://maven.apache.org/plugins/maven-shade-plugin/">Maven
|
||||
* shade plugin</a> to allow properties files (e.g. {@literal META-INF/spring.factories})
|
||||
* to be merged without losing any information.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -108,7 +108,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
|
||||
* the main artifact will be used as source and the repackaged archive will be
|
||||
* attached as a supplemental artifact with that classifier. Attaching the artifact
|
||||
* allows to deploy it alongside to the original one, see <a href=
|
||||
* "http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html"
|
||||
* "https://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html"
|
||||
* > the maven documentation for more details</a>.
|
||||
* @since 1.0
|
||||
*/
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
port to the integration test itself.
|
||||
|
||||
The example below showcases how you could achieve the same feature using the
|
||||
{{{http://mojo.codehaus.org/build-helper-maven-plugin/}build-helper-plugin}}:
|
||||
{{{https://www.mojohaus.org/build-helper-maven-plugin/}build-helper-plugin}}:
|
||||
|
||||
---
|
||||
<project>
|
||||
|
||||
@@ -33,7 +33,7 @@ Spring Boot Maven Plugin
|
||||
more specific use cases are described in the examples given below.
|
||||
|
||||
In case you still have questions regarding the plugin's usage, please have a look at the existing
|
||||
{{{http://stackoverflow.com/questions/tagged/spring-boot}stack overflow issue}}. If you still don't get an
|
||||
{{{https://stackoverflow.com/questions/tagged/spring-boot}stack overflow issue}}. If you still don't get an
|
||||
answer, feel free to create a new thread with the <<<#spring-boot>>> tag.
|
||||
|
||||
If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report
|
||||
|
||||
@@ -253,7 +253,7 @@ spring.devtools.remote.restart.enabled=false
|
||||
</build>
|
||||
---
|
||||
|
||||
Such setup can now use the {{{http://maven.apache.org/surefire/maven-failsafe-plugin/}failsafe-plugin}} to
|
||||
Such setup can now use the {{{https://maven.apache.org/surefire/maven-failsafe-plugin/}failsafe-plugin}} to
|
||||
run your integration tests as you would expect.
|
||||
|
||||
You could also configure a more advanced setup to skip the integration tests when a specific property has
|
||||
|
||||
@@ -121,7 +121,7 @@ public final class AnsiColors {
|
||||
: (1.0 / 3.0) * Math.pow(29.0 / 6.0, 2) * t + (4.0 / 29.0);
|
||||
}
|
||||
|
||||
// See http://en.wikipedia.org/wiki/Color_difference#CIE94
|
||||
// See https://en.wikipedia.org/wiki/Color_difference#CIE94
|
||||
public double getDistance(LabColor other) {
|
||||
double c1 = Math.sqrt(this.a * this.a + this.b * this.b);
|
||||
double deltaC = c1 - Math.sqrt(other.a * other.a + other.b * other.b);
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 1.3.0
|
||||
* @see "http://cloud.spring.io"
|
||||
* @see "https://cloud.spring.io"
|
||||
*/
|
||||
public enum CloudPlatform {
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* {@link BeanFactoryPostProcessor} to automatically setup the recommended
|
||||
* {@link BeanDefinition#setDependsOn(String[]) dependsOn} settings for
|
||||
* <a href="http://www.atomikos.com/Documentation/SpringIntegration">correct Atomikos
|
||||
* <a href="https://www.atomikos.com/Documentation/SpringIntegration">correct Atomikos
|
||||
* ordering</a>.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* Bean friendly variant of
|
||||
* <a href="http://www.atomikos.com/Documentation/JtaProperties">Atomikos configuration
|
||||
* <a href="https://www.atomikos.com/Documentation/JtaProperties">Atomikos configuration
|
||||
* properties</a>. Allows for setter based configuration and is amiable to relaxed data
|
||||
* binding.
|
||||
*
|
||||
@@ -191,10 +191,10 @@ public class AtomikosProperties {
|
||||
* address. If you plan to run more than one transaction manager against one database
|
||||
* you must set this property to a unique value or you might run into duplicate
|
||||
* transaction ID (XID) problems that can be quite subtle (example:
|
||||
* {@literal http://fogbugz.atomikos.com/default.asp?community.6.2225.7}). If multiple
|
||||
* instances need to use the same properties file then the easiest way to ensure
|
||||
* uniqueness for this property is by referencing a system property specified at VM
|
||||
* startup.
|
||||
* {@literal https://fogbugz.atomikos.com/default.asp?community.6.2225.7}). If
|
||||
* multiple instances need to use the same properties file then the easiest way to
|
||||
* ensure uniqueness for this property is by referencing a system property specified
|
||||
* at VM startup.
|
||||
* @param uniqueName the unique name
|
||||
*/
|
||||
public void setTransactionManagerUniqueName(String uniqueName) {
|
||||
|
||||
@@ -50,7 +50,7 @@ import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* {@link LoggingSystem} for <a href="http://logging.apache.org/log4j/2.x/">Log4j 2</a>.
|
||||
* {@link LoggingSystem} for <a href="https://logging.apache.org/log4j/2.x/">Log4j 2</a>.
|
||||
*
|
||||
* @author Daniel Fullarton
|
||||
* @author Andy Wilkinson
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* {@link LoggingSystem} for <a href="http://logback.qos.ch">logback</a>.
|
||||
* {@link LoggingSystem} for <a href="https://logback.qos.ch">logback</a>.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @author Dave Syer
|
||||
|
||||
@@ -99,7 +99,7 @@ public class OriginTrackedYamlLoaderTests {
|
||||
OriginTrackedValue bar2 = getValue("example.foo[0].bar[1].bar2");
|
||||
assertThat(name.toString()).isEqualTo("springboot");
|
||||
assertThat(getLocation(name)).isEqualTo("22:15");
|
||||
assertThat(url.toString()).isEqualTo("http://springboot.com");
|
||||
assertThat(url.toString()).isEqualTo("https://springboot.example.com/");
|
||||
assertThat(getLocation(url)).isEqualTo("23:14");
|
||||
assertThat(bar1.toString()).isEqualTo("baz");
|
||||
assertThat(getLocation(bar1)).isEqualTo("25:19");
|
||||
|
||||
@@ -110,9 +110,9 @@ public class RestTemplateBuilderTests {
|
||||
|
||||
@Test
|
||||
public void rootUriShouldApply() {
|
||||
RestTemplate restTemplate = this.builder.rootUri("http://example.com").build();
|
||||
RestTemplate restTemplate = this.builder.rootUri("https://example.com").build();
|
||||
MockRestServiceServer server = MockRestServiceServer.bindTo(restTemplate).build();
|
||||
server.expect(requestTo("http://example.com/hello")).andRespond(withSuccess());
|
||||
server.expect(requestTo("https://example.com/hello")).andRespond(withSuccess());
|
||||
restTemplate.getForEntity("/hello", String.class);
|
||||
server.verify();
|
||||
}
|
||||
@@ -121,11 +121,11 @@ public class RestTemplateBuilderTests {
|
||||
public void rootUriShouldApplyAfterUriTemplateHandler() {
|
||||
UriTemplateHandler uriTemplateHandler = mock(UriTemplateHandler.class);
|
||||
RestTemplate template = this.builder.uriTemplateHandler(uriTemplateHandler)
|
||||
.rootUri("http://example.com").build();
|
||||
.rootUri("https://example.com").build();
|
||||
UriTemplateHandler handler = template.getUriTemplateHandler();
|
||||
handler.expand("/hello");
|
||||
assertThat(handler).isInstanceOf(RootUriTemplateHandler.class);
|
||||
verify(uriTemplateHandler).expand("http://example.com/hello");
|
||||
verify(uriTemplateHandler).expand("https://example.com/hello");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -54,8 +54,8 @@ public class RootUriTemplateHandlerTests {
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setup() throws URISyntaxException {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
this.uri = new URI("http://example.com/hello");
|
||||
this.handler = new RootUriTemplateHandler("http://example.com", this.delegate);
|
||||
this.uri = new URI("https://example.com/hello");
|
||||
this.handler = new RootUriTemplateHandler("https://example.com", this.delegate);
|
||||
given(this.delegate.expand(anyString(), any(Map.class))).willReturn(this.uri);
|
||||
given(this.delegate.expand(anyString(), any(Object[].class)))
|
||||
.willReturn(this.uri);
|
||||
@@ -71,7 +71,7 @@ public class RootUriTemplateHandlerTests {
|
||||
@Test
|
||||
public void createWithNullHandlerShouldThrowException() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> new RootUriTemplateHandler("http://example.com", null))
|
||||
.isThrownBy(() -> new RootUriTemplateHandler("https://example.com", null))
|
||||
.withMessageContaining("Handler must not be null");
|
||||
}
|
||||
|
||||
@@ -79,15 +79,15 @@ public class RootUriTemplateHandlerTests {
|
||||
public void expandMapVariablesShouldPrefixRoot() {
|
||||
HashMap<String, Object> uriVariables = new HashMap<>();
|
||||
URI expanded = this.handler.expand("/hello", uriVariables);
|
||||
verify(this.delegate).expand("http://example.com/hello", uriVariables);
|
||||
verify(this.delegate).expand("https://example.com/hello", uriVariables);
|
||||
assertThat(expanded).isEqualTo(this.uri);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void expandMapVariablesWhenPathDoesNotStartWithSlashShouldNotPrefixRoot() {
|
||||
HashMap<String, Object> uriVariables = new HashMap<>();
|
||||
URI expanded = this.handler.expand("http://spring.io/hello", uriVariables);
|
||||
verify(this.delegate).expand("http://spring.io/hello", uriVariables);
|
||||
URI expanded = this.handler.expand("https://spring.io/hello", uriVariables);
|
||||
verify(this.delegate).expand("https://spring.io/hello", uriVariables);
|
||||
assertThat(expanded).isEqualTo(this.uri);
|
||||
}
|
||||
|
||||
@@ -95,15 +95,15 @@ public class RootUriTemplateHandlerTests {
|
||||
public void expandArrayVariablesShouldPrefixRoot() {
|
||||
Object[] uriVariables = new Object[0];
|
||||
URI expanded = this.handler.expand("/hello", uriVariables);
|
||||
verify(this.delegate).expand("http://example.com/hello", uriVariables);
|
||||
verify(this.delegate).expand("https://example.com/hello", uriVariables);
|
||||
assertThat(expanded).isEqualTo(this.uri);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void expandArrayVariablesWhenPathDoesNotStartWithSlashShouldNotPrefixRoot() {
|
||||
Object[] uriVariables = new Object[0];
|
||||
URI expanded = this.handler.expand("http://spring.io/hello", uriVariables);
|
||||
verify(this.delegate).expand("http://spring.io/hello", uriVariables);
|
||||
URI expanded = this.handler.expand("https://spring.io/hello", uriVariables);
|
||||
verify(this.delegate).expand("https://spring.io/hello", uriVariables);
|
||||
assertThat(expanded).isEqualTo(this.uri);
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ public class RootUriTemplateHandlerTests {
|
||||
public void applyShouldWrapExistingTemplate() {
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
restTemplate.setUriTemplateHandler(this.delegate);
|
||||
this.handler = RootUriTemplateHandler.addTo(restTemplate, "http://example.com");
|
||||
this.handler = RootUriTemplateHandler.addTo(restTemplate, "https://example.com");
|
||||
Object[] uriVariables = new Object[0];
|
||||
URI expanded = this.handler.expand("/hello", uriVariables);
|
||||
verify(this.delegate).expand("http://example.com/hello", uriVariables);
|
||||
verify(this.delegate).expand("https://example.com/hello", uriVariables);
|
||||
assertThat(expanded).isEqualTo(this.uri);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# http://docs.ansible.com/ansible/YAMLSyntax.html
|
||||
# https://docs.ansible.com/ansible/YAMLSyntax.html
|
||||
|
||||
name: Martin D'vloper
|
||||
job: Developer
|
||||
@@ -20,7 +20,7 @@ education: |
|
||||
example:
|
||||
foo:
|
||||
- name: springboot
|
||||
url: http://springboot.com
|
||||
url: https://springboot.example.com/
|
||||
bar:
|
||||
- bar1: baz
|
||||
- bar2: bling
|
||||
|
||||
Reference in New Issue
Block a user