Merge pull request #16319 from Spring Operator

* gh-16319:
  Polish "Use HTTPS for external links wherever possible"
  Use HTTPS for external links wherever possible
pull/16507/head
Andy Wilkinson 6 years ago
commit 7f69e410cb

@ -113,9 +113,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")));
}
@ -204,7 +204,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"),

@ -102,7 +102,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);
@ -126,7 +126,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();
@ -140,7 +140,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);
@ -157,7 +157,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);
@ -168,7 +168,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");
});
}
@ -193,7 +193,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);
@ -240,7 +240,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);
@ -258,7 +258,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);
@ -282,7 +282,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();
@ -304,7 +304,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(
@ -327,7 +327,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;

@ -259,7 +259,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

@ -84,7 +84,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);
@ -108,7 +108,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"))
@ -122,7 +122,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);
@ -139,7 +139,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);
@ -150,7 +150,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");
});
}
@ -159,7 +159,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(
@ -229,7 +229,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);
@ -247,7 +247,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(
@ -271,7 +271,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(HealthEndpointAutoConfiguration.class))
.run((context) -> {

@ -98,9 +98,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"));
}
@ -203,7 +203,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"));

@ -41,21 +41,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();
}

@ -82,9 +82,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"));
}
@ -127,7 +127,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")),

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 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.
@ -26,8 +26,6 @@ import org.springframework.util.Assert;
* Subclass of {@link SpringBeanJobFactory} that supports auto-wiring job beans.
*
* @author Vedran Pavic
* @see <a href="http://blog.btmatthews.com/?p=40#comment-33797">Inject application
* context dependencies in Quartz job beans</a>
*/
class AutowireCapableBeanJobFactory extends SpringBeanJobFactory {

@ -47,18 +47,18 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
public void getClientRegistrationsWhenUsingDefinedProviderShouldAdapt() {
OAuth2ClientProperties properties = new OAuth2ClientProperties();
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");
Registration registration = new Registration();
registration.setProvider("provider");
registration.setClientId("clientId");
registration.setClientSecret("clientSecret");
registration.setClientAuthenticationMethod("post");
registration.setAuthorizationGrantType("authorization_code");
registration.setRedirectUriTemplate("http://example.com/redirect");
registration.setRedirectUriTemplate("https://example.com/redirect");
registration.setScope(Collections.singleton("scope"));
registration.setClientName("clientName");
properties.getProvider().put("provider", provider);
@ -68,13 +68,13 @@ 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");
assertThat(adaptedProvider.getUserInfoEndpoint().getUri())
.isEqualTo("http://example.com/info");
.isEqualTo("https://example.com/info");
assertThat(adaptedProvider.getUserInfoEndpoint().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");
@ -83,7 +83,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("scope");
assertThat(adapted.getClientName()).isEqualTo("clientName");
}
@ -132,7 +132,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests {
registration.setClientSecret("clientSecret");
registration.setClientAuthenticationMethod("post");
registration.setAuthorizationGrantType("authorization_code");
registration.setRedirectUriTemplate("http://example.com/redirect");
registration.setRedirectUriTemplate("https://example.com/redirect");
registration.setScope(Collections.singleton("scope"));
registration.setClientName("clientName");
properties.getRegistration().put("registration", registration);
@ -158,7 +158,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("scope");
assertThat(adapted.getClientName()).isEqualTo("clientName");
}

@ -183,7 +183,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);
}
@ -195,9 +196,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();
}

@ -100,23 +100,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.class);
verify(customizer, times(1)).customize(any(WebClient.Builder.class));

@ -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">

@ -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>

@ -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]

@ -33,7 +33,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>
@ -108,7 +108,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>
<!-- ... -->
@ -137,7 +137,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>
<!-- ... -->
@ -366,7 +366,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.

@ -113,7 +113,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/`.
@ -202,7 +202,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] ------------------------------------------------------------------------
@ -218,7 +218,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
@ -372,11 +372,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.
@ -643,7 +643,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:
@ -812,7 +812,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]]

@ -129,7 +129,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>
@ -257,7 +257,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"]
@ -305,7 +305,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]
@ -323,7 +323,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]
@ -358,7 +358,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]
@ -499,7 +499,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>

@ -1447,7 +1447,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
@ -1551,7 +1551,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
@ -2201,7 +2201,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
@ -2591,7 +2591,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.
@ -3227,9 +3227,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>

@ -46,9 +46,9 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:spring-rest-docs: https://projects.spring.io/spring-restdocs/
:spring-integration: https://projects.spring.io/spring-integration/
:spring-session: https://projects.spring.io/spring-session/
:spring-framework: http://projects.spring.io/spring-framework/
:spring-security: http://projects.spring.io/spring-security/
:spring-data-jpa: http://projects.spring.io/spring-data-jpa/
:spring-framework: https://projects.spring.io/spring-framework/
:spring-security: https://projects.spring.io/spring-security/
:spring-data-jpa: https://projects.spring.io/spring-data-jpa/
:spring-security-reference: https://docs.spring.io/spring-security/site/docs/{spring-security-docs-version}/reference/htmlsingle
:spring-security-oauth2-reference: https://projects.spring.io/spring-security-oauth/docs/oauth2.html
:spring-webservices-reference: https://docs.spring.io/spring-ws/docs/{spring-webservices-docs-version}/reference/
@ -62,7 +62,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:spring-data: https://projects.spring.io/spring-data/
:spring-data-rest-javadoc: https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
:gradle-userguide: https://www.gradle.org/docs/current/userguide
:ant-manual: http://ant.apache.org/manual
:ant-manual: https://ant.apache.org/manual
:code-examples: ../java/org/springframework/boot/docs
:test-examples: ../../test/java/org/springframework/boot/docs
:gradle-user-guide: https://docs.gradle.org/4.2.1/userguide
@ -70,7 +70,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:jetty-documentation: https://www.eclipse.org/jetty/documentation/9.4.x
:jooq-manual: https://www.jooq.org/doc/{jooq-version}/manual-single-page
:micrometer-concepts-documentation: https://micrometer.io/docs/concepts
:micrometer-registry-documentation: http://micrometer.io/docs/registry
:micrometer-registry-documentation: https://micrometer.io/docs/registry
:tomcat-documentation: https://tomcat.apache.org/tomcat-8.5-doc
:kotlin-documentation: https://kotlinlang.org/docs/reference/
:junit5-documentation: https://junit.org/junit5/docs/current/user-guide

@ -474,7 +474,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
----
@ -1401,7 +1401,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
----
@ -1478,7 +1478,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
----
@ -2049,7 +2049,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

@ -247,7 +247,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]
@ -421,7 +421,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:

@ -667,10 +667,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`.
@ -689,10 +689,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
----
@ -700,9 +700,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
----
@ -1506,12 +1506,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
@ -1829,7 +1829,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:
@ -2293,7 +2293,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
@ -2508,7 +2508,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.
@ -2546,7 +2546,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
@ -2723,8 +2723,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`.
@ -2845,7 +2845,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] 1.x and
http://cxf.apache.org/[Apache CXF] work quite well out of the box if you register their
https://cxf.apache.org/[Apache CXF] work quite well out of the box if you register their
`Servlet` or `Filter` as a `@Bean` in your application context. Jersey 2.x has some native
Spring support, so we also provide auto-configuration support for it in Spring Boot,
together with a starter.
@ -2921,10 +2921,11 @@ JAX-RS resources are packaged as nested jars, you may need to do the same.
[[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.
@ -3248,7 +3249,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
@ -3257,7 +3258,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
@ -3388,8 +3389,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.
@ -3483,7 +3484,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:
@ -3725,8 +3726,8 @@ views. If you do not want this behavior, you should set `spring.jpa.open-in-view
[[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:
@ -3753,8 +3754,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.
@ -3886,7 +3887,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
@ -3940,7 +3941,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`
@ -4107,7 +4108,7 @@ the Mongo instance's configuration and logging routing.
[[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`
@ -4248,7 +4249,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
@ -4299,7 +4300,7 @@ https://projects.spring.io/spring-data-solr/[reference documentation].
[[boot-features-elasticsearch]]
=== Elasticsearch
http://www.elasticsearch.org/[Elasticsearch] is an open source, distributed, real-time
https://www.elastic.co/[Elasticsearch] is an open source, distributed, real-time
search and analytics engine. Spring Boot offers basic auto-configuration for
Elasticsearch and the abstractions on top of it provided by
https://github.com/spring-projects/spring-data-elasticsearch[Spring Data Elasticsearch].
@ -4317,7 +4318,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
@ -4388,7 +4389,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
@ -4446,7 +4447,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
@ -4685,7 +4686,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
@ -4868,7 +4869,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:
@ -4891,7 +4892,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]
@ -4967,7 +4968,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
@ -5079,7 +5080,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).
@ -5124,7 +5125,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
@ -5463,7 +5464,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
@ -5672,7 +5673,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) {
@ -5774,7 +5775,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.
@ -5838,11 +5839,12 @@ property with a different value for each instance of your application.
[[boot-features-jta-narayana]]
=== Using a Narayana Transaction Manager
http://narayana.io/[Narayana] is a popular open source JTA transaction manager
implementation supported by JBoss. You can use the `spring-boot-starter-jta-narayana`
starter to add the appropriate Narayana dependencies to your project. As with Atomikos and
Bitronix, Spring Boot automatically configures Narayana and post-processes your beans to
ensure that startup and shutdown ordering is correct.
https://github.com/jbosstm/narayana[Narayana] is a popular open source JTA transaction
manager implementation supported by JBoss. You can use the
`spring-boot-starter-jta-narayana` starter to add the appropriate Narayana dependencies
to your project. As with Atomikos and Bitronix, Spring Boot automatically configures
Narayana and post-processes your beans to ensure that startup and shutdown ordering is
correct.
By default, Narayana transaction logs are written to a `transaction-logs` directory in
your application home directory (the directory in which your application jar file
@ -5948,7 +5950,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
@ -5969,7 +5971,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).
@ -6146,13 +6148,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.
@ -7466,7 +7468,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");
}
@ -7608,7 +7610,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.
@ -7924,7 +7926,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.
@ -7959,7 +7961,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
@ -8111,7 +8113,7 @@ instance lifecycle to "per-class"].
[[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]

@ -34,7 +34,7 @@ do as they were designed before this was clarified.
| https://wicket.apache.org/[Apache Wicket]
| https://github.com/MarcGiffing/wicket-spring-boot
| http://www.axonframework.org/[Axon Framework]
| https://axoniq.io[Axon Framework]
| https://github.com/AxonFramework/AxonFramework
| https://azure.microsoft.com/[Azure]
@ -70,7 +70,7 @@ 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
| https://www.grpc.io/[gRPC]
@ -100,7 +100,7 @@ do as they were designed before this was clarified.
| JSF integration for various libraries
| 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]
@ -122,7 +122,7 @@ do as they were designed before this was clarified.
| https://github.com/societe-generale/rabbitmq-advanced-spring-boot-starter
| https://resteasy.jboss.org/[RESTEasy]
| https://github.com/paypal/resteasy-spring-boot
| https://github.com/resteasy/resteasy-spring-boot
| https://github.com/rollbar/rollbar-java/[Rollbar]
| https://github.com/olmero/rollbar-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>

@ -104,7 +104,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,

@ -95,14 +95,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);

@ -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");

@ -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

@ -11,7 +11,7 @@
<div class="container">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="http://freemarker.org/"> FreeMarker -
<a class="brand" href="https://freemarker.apache.org/"> FreeMarker -
Plain </a>
<ul class="nav">
<li><a href="${home}"> Home </a></li>

@ -11,7 +11,7 @@
<div class="container">
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="http://freemarker.org/"> FreeMarker -
<a class="brand" href="https://freemarker.apache.org/"> FreeMarker -
Plain </a>
<ul class="nav">
<li><a href="${home}"> Home </a></li>

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html xmlns:th="https://www.thymeleaf.org">
<head th:fragment="head (title)">
<title th:text="${title}">Fragments</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"
@ -8,7 +8,7 @@
<body>
<div class="container">
<nav th:fragment="navbar" class="navbar navbar-dark bg-primary">
<a class="navbar-brand" href="http://thymeleaf.org">Thymeleaf</a>
<a class="navbar-brand" href="https://www.thymeleaf.org/">Thymeleaf</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item"><a class="nav-link" th:href="@{/}" href="messages.html">Messages</a></li>
</ul>

Loading…
Cancel
Save