From cec69feb95893bda37c07e3e227879735c9d24dc Mon Sep 17 00:00:00 2001 From: Guirong Hu Date: Wed, 12 Jan 2022 19:53:23 +0800 Subject: [PATCH 01/77] Configure ForwardedHeaderFilter with Tomcat's use relative redirects Previously, when Tomcat was configured to use relative redirects and the ForwardedHeaderFilter is in use, the filter would ignore the use of the relative redirects. This commit corrects this misalignment by applying Tomcat's use relative redirects setting to the filter, but only when Tomcat is being used as the servlet container. See gh-29333 --- ...vletWebServerFactoryAutoConfiguration.java | 36 ++++++++++++++----- ...ebServerFactoryAutoConfigurationTests.java | 31 ++++++++++++++++ 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java index fc3d9c1380cf..a7d18cddf849 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 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. @@ -85,15 +85,33 @@ public TomcatServletWebServerFactoryCustomizer tomcatServletWebServerFactoryCust return new TomcatServletWebServerFactoryCustomizer(serverProperties); } - @Bean - @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) + @Configuration(proxyBeanMethods = false) @ConditionalOnProperty(value = "server.forward-headers-strategy", havingValue = "framework") - public FilterRegistrationBean forwardedHeaderFilter() { - ForwardedHeaderFilter filter = new ForwardedHeaderFilter(); - FilterRegistrationBean registration = new FilterRegistrationBean<>(filter); - registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC, DispatcherType.ERROR); - registration.setOrder(Ordered.HIGHEST_PRECEDENCE); - return registration; + static class ForwardedHeaderFilterConfiguration { + + @Bean + @ConditionalOnClass(name = "org.apache.catalina.startup.Tomcat") + @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) + public FilterRegistrationBean tomcatForwardedHeaderFilter( + ServerProperties serverProperties) { + return createForwardedHeaderFilter(serverProperties.getTomcat().isUseRelativeRedirects()); + } + + @Bean + @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) + public FilterRegistrationBean defaultForwardedHeaderFilter() { + return createForwardedHeaderFilter(false); + } + + private FilterRegistrationBean createForwardedHeaderFilter(boolean relativeRedirects) { + ForwardedHeaderFilter filter = new ForwardedHeaderFilter(); + filter.setRelativeRedirects(relativeRedirects); + FilterRegistrationBean registration = new FilterRegistrationBean<>(filter); + registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC, DispatcherType.ERROR); + registration.setOrder(Ordered.HIGHEST_PRECEDENCE); + return registration; + } + } /** diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java index 0338bcdd1658..ffdc3071a1ee 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java @@ -57,6 +57,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; +import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.filter.ForwardedHeaderFilter; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.FrameworkServlet; @@ -368,6 +369,36 @@ void forwardedHeaderFilterWhenFilterAlreadyRegisteredShouldBackOff() { .run((context) -> assertThat(context).hasSingleBean(FilterRegistrationBean.class)); } + @Test + void relativeRedirectsShouldBeEnabledWhenUsingTomcatContainerAndUseRelativeRedirects() { + WebApplicationContextRunner runner = new WebApplicationContextRunner( + AnnotationConfigServletWebServerApplicationContext::new) + .withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class)) + .withPropertyValues("server.forward-headers-strategy=framework", + "server.tomcat.use-relative-redirects=true"); + + runner.run((context) -> { + Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); + Boolean relativeRedirects = (Boolean) ReflectionTestUtils.getField(filter, "relativeRedirects"); + assertThat(relativeRedirects).isTrue(); + }); + } + + @Test + void relativeRedirectsShouldNotBeEnabledWhenNotUsingTomcatContainer() { + WebApplicationContextRunner runner = new WebApplicationContextRunner( + AnnotationConfigServletWebServerApplicationContext::new) + .withClassLoader(new FilteredClassLoader(Tomcat.class)) + .withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class)) + .withPropertyValues("server.forward-headers-strategy=framework"); + + runner.run((context) -> { + Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); + Boolean relativeRedirects = (Boolean) ReflectionTestUtils.getField(filter, "relativeRedirects"); + assertThat(relativeRedirects).isFalse(); + }); + } + private ContextConsumer verifyContext() { return this::verifyContext; } From 64ee54423a4e1b4e08e0e482ef6eede9dd82b0aa Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 9 Feb 2022 17:27:13 +0000 Subject: [PATCH 02/77] Polish "Configure ForwardedHeaderFilter with Tomcat's use relative redirects" See gh-29333 --- ...vletWebServerFactoryAutoConfiguration.java | 22 +++++++++-------- ...ebServerFactoryAutoConfigurationTests.java | 24 ++++++++++++++----- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java index a7d18cddf849..0537653e99e1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.java @@ -87,25 +87,21 @@ public TomcatServletWebServerFactoryCustomizer tomcatServletWebServerFactoryCust @Configuration(proxyBeanMethods = false) @ConditionalOnProperty(value = "server.forward-headers-strategy", havingValue = "framework") + @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) static class ForwardedHeaderFilterConfiguration { @Bean @ConditionalOnClass(name = "org.apache.catalina.startup.Tomcat") @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) - public FilterRegistrationBean tomcatForwardedHeaderFilter( - ServerProperties serverProperties) { - return createForwardedHeaderFilter(serverProperties.getTomcat().isUseRelativeRedirects()); + ForwardedHeaderFilterCustomizer tomcatForwardedHeaderFilterCustomizer(ServerProperties serverProperties) { + return (filter) -> filter.setRelativeRedirects(serverProperties.getTomcat().isUseRelativeRedirects()); } @Bean - @ConditionalOnMissingFilterBean(ForwardedHeaderFilter.class) - public FilterRegistrationBean defaultForwardedHeaderFilter() { - return createForwardedHeaderFilter(false); - } - - private FilterRegistrationBean createForwardedHeaderFilter(boolean relativeRedirects) { + FilterRegistrationBean forwardedHeaderFilter( + ObjectProvider customizerProvider) { ForwardedHeaderFilter filter = new ForwardedHeaderFilter(); - filter.setRelativeRedirects(relativeRedirects); + customizerProvider.ifAvailable((customizer) -> customizer.customize(filter)); FilterRegistrationBean registration = new FilterRegistrationBean<>(filter); registration.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.ASYNC, DispatcherType.ERROR); registration.setOrder(Ordered.HIGHEST_PRECEDENCE); @@ -114,6 +110,12 @@ private FilterRegistrationBean createForwardedHeaderFilte } + interface ForwardedHeaderFilterCustomizer { + + void customize(ForwardedHeaderFilter filter); + + } + /** * Registers a {@link WebServerFactoryCustomizerBeanPostProcessor}. Registered via * {@link ImportBeanDefinitionRegistrar} for early registration. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java index ffdc3071a1ee..c30bc1c0cfc8 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfigurationTests.java @@ -57,7 +57,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; -import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.filter.ForwardedHeaderFilter; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.FrameworkServlet; @@ -353,6 +352,7 @@ void forwardedHeaderFilterShouldBeConfigured() { assertThat(context).hasSingleBean(FilterRegistrationBean.class); Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); assertThat(filter).isInstanceOf(ForwardedHeaderFilter.class); + assertThat(filter).extracting("relativeRedirects").isEqualTo(false); }); } @@ -376,11 +376,24 @@ void relativeRedirectsShouldBeEnabledWhenUsingTomcatContainerAndUseRelativeRedir .withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class)) .withPropertyValues("server.forward-headers-strategy=framework", "server.tomcat.use-relative-redirects=true"); + runner.run((context) -> { + Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); + assertThat(filter).isInstanceOf(ForwardedHeaderFilter.class); + assertThat(filter).extracting("relativeRedirects").isEqualTo(true); + }); + } + @Test + void relativeRedirectsShouldNotBeEnabledWhenUsingTomcatContainerAndNotUsingRelativeRedirects() { + WebApplicationContextRunner runner = new WebApplicationContextRunner( + AnnotationConfigServletWebServerApplicationContext::new) + .withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class)) + .withPropertyValues("server.forward-headers-strategy=framework", + "server.tomcat.use-relative-redirects=false"); runner.run((context) -> { Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); - Boolean relativeRedirects = (Boolean) ReflectionTestUtils.getField(filter, "relativeRedirects"); - assertThat(relativeRedirects).isTrue(); + assertThat(filter).isInstanceOf(ForwardedHeaderFilter.class); + assertThat(filter).extracting("relativeRedirects").isEqualTo(false); }); } @@ -391,11 +404,10 @@ void relativeRedirectsShouldNotBeEnabledWhenNotUsingTomcatContainer() { .withClassLoader(new FilteredClassLoader(Tomcat.class)) .withConfiguration(AutoConfigurations.of(ServletWebServerFactoryAutoConfiguration.class)) .withPropertyValues("server.forward-headers-strategy=framework"); - runner.run((context) -> { Filter filter = context.getBean(FilterRegistrationBean.class).getFilter(); - Boolean relativeRedirects = (Boolean) ReflectionTestUtils.getField(filter, "relativeRedirects"); - assertThat(relativeRedirects).isFalse(); + assertThat(filter).isInstanceOf(ForwardedHeaderFilter.class); + assertThat(filter).extracting("relativeRedirects").isEqualTo(false); }); } From 49bf620f4b6f2a02455526fa0a82a5d8f4400983 Mon Sep 17 00:00:00 2001 From: Gnaily <37478414+Gnaily@users.noreply.github.com> Date: Sun, 9 Jan 2022 21:59:58 +0800 Subject: [PATCH 03/77] Override available() in RandomAccessDataFile's InputStream See gh-29295 --- .../boot/loader/data/RandomAccessDataFile.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java index 61d6e557e22e..635818c8e828 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java @@ -180,6 +180,11 @@ public long skip(long n) throws IOException { return (n <= 0) ? 0 : moveOn(cap(n)); } + @Override + public int available() throws IOException { + return (int) RandomAccessDataFile.this.length - this.position; + } + /** * Cap the specified value such that it cannot exceed the number of bytes * remaining. From 4f724f14d361e15a14428d9805b1b79bb78db774 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 10 Feb 2022 15:23:55 +0000 Subject: [PATCH 04/77] Polish "Override available() in RandomAccessDataFile's InputStream" See gh-29295 --- .../boot/loader/data/RandomAccessDataFile.java | 2 +- .../boot/loader/data/RandomAccessDataFileTests.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java index 635818c8e828..06d9abcda51a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessDataFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java index fd567134f4c2..28427cd1dab2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -199,6 +199,15 @@ void inputStreamSkipPastEnd() throws Exception { assertThat(amountSkipped).isEqualTo(0L); } + @Test + void inputStreamAvailable() throws Exception { + assertThat(this.inputStream.available()).isEqualTo(256); + this.inputStream.skip(56); + assertThat(this.inputStream.available()).isEqualTo(200); + this.inputStream.skip(200); + assertThat(this.inputStream.available()).isEqualTo(0); + } + @Test void subsectionNegativeOffset() { assertThatExceptionOfType(IndexOutOfBoundsException.class).isThrownBy(() -> this.file.getSubsection(-1, 1)); From 131ea706c72df054468d8becd3843f26ea7ab85d Mon Sep 17 00:00:00 2001 From: Lukas Kuster Date: Wed, 26 Jan 2022 11:21:16 +0100 Subject: [PATCH 05/77] Auto-configure Spring rather than Nimbus opaque token introspectors See gh-29572 --- ...eactiveOAuth2ResourceServerOpaqueTokenConfiguration.java | 6 +++--- .../OAuth2ResourceServerOpaqueTokenConfiguration.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java index c7eda3e48a5d..e26f692fdc00 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java @@ -24,8 +24,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.security.config.web.server.ServerHttpSecurity; import org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ResourceServerSpec; -import org.springframework.security.oauth2.server.resource.introspection.NimbusReactiveOpaqueTokenIntrospector; import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector; +import org.springframework.security.oauth2.server.resource.introspection.SpringReactiveOpaqueTokenIntrospector; import org.springframework.security.web.server.SecurityWebFilterChain; /** @@ -43,9 +43,9 @@ static class OpaqueTokenIntrospectionClientConfiguration { @Bean @ConditionalOnProperty(name = "spring.security.oauth2.resourceserver.opaquetoken.introspection-uri") - NimbusReactiveOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) { + SpringReactiveOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) { OAuth2ResourceServerProperties.Opaquetoken opaqueToken = properties.getOpaquetoken(); - return new NimbusReactiveOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(), + return new SpringReactiveOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(), opaqueToken.getClientId(), opaqueToken.getClientSecret()); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java index 7f0ca78e19ba..744548396802 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java @@ -26,8 +26,8 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.configurers.oauth2.server.resource.OAuth2ResourceServerConfigurer; -import org.springframework.security.oauth2.server.resource.introspection.NimbusOpaqueTokenIntrospector; import org.springframework.security.oauth2.server.resource.introspection.OpaqueTokenIntrospector; +import org.springframework.security.oauth2.server.resource.introspection.SpringOpaqueTokenIntrospector; import org.springframework.security.web.SecurityFilterChain; /** @@ -46,9 +46,9 @@ static class OpaqueTokenIntrospectionClientConfiguration { @Bean @ConditionalOnProperty(name = "spring.security.oauth2.resourceserver.opaquetoken.introspection-uri") - NimbusOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) { + SpringOpaqueTokenIntrospector opaqueTokenIntrospector(OAuth2ResourceServerProperties properties) { OAuth2ResourceServerProperties.Opaquetoken opaqueToken = properties.getOpaquetoken(); - return new NimbusOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(), opaqueToken.getClientId(), + return new SpringOpaqueTokenIntrospector(opaqueToken.getIntrospectionUri(), opaqueToken.getClientId(), opaqueToken.getClientSecret()); } From 6901f6dab2d30704d3dd5aad4131442267a6dfee Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 10 Feb 2022 16:57:13 +0000 Subject: [PATCH 06/77] Test our Gradle plugin against Gradle 7.4 Closes gh-29673 --- .../boot/gradle/junit/GradleCompatibilityExtension.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java index c68eb732a7e8..44ffcb74a057 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilityExtension.java @@ -48,13 +48,13 @@ final class GradleCompatibilityExtension implements TestTemplateInvocationContex static { JavaVersion javaVersion = JavaVersion.current(); if (javaVersion.isCompatibleWith(JavaVersion.VERSION_17)) { - GRADLE_VERSIONS = Arrays.asList("7.2", "7.3.3"); + GRADLE_VERSIONS = Arrays.asList("7.2", "7.3.3", "7.4"); } else if (javaVersion.isCompatibleWith(JavaVersion.VERSION_16)) { - GRADLE_VERSIONS = Arrays.asList("7.0.2", "7.1.1", "7.2", "7.3.3"); + GRADLE_VERSIONS = Arrays.asList("7.0.2", "7.1.1", "7.2", "7.3.3", "7.4"); } else { - GRADLE_VERSIONS = Arrays.asList("6.8.3", "current", "7.0.2", "7.1.1", "7.2", "7.3.3"); + GRADLE_VERSIONS = Arrays.asList("6.8.3", "current", "7.0.2", "7.1.1", "7.2", "7.3.3", "7.4"); } } From fc5ede7b946b69864c77834131571d52199a285a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 10 Feb 2022 17:11:04 +0000 Subject: [PATCH 07/77] Polish "Auto-configure Spring rather than Nimbus opaque token introspectors" See gh-29572 --- .../ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java | 2 +- .../servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java index e26f692fdc00..112ec4411eda 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/reactive/ReactiveOAuth2ResourceServerOpaqueTokenConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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. diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java index 744548396802..9586cfa3313d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerOpaqueTokenConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 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. From 5767e1fda1e0c629f0dc1fb53fa3a7fb7347ce18 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:25:38 +0100 Subject: [PATCH 08/77] Start building against Reactor 2020.0.16 snapshots See gh-29707 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7627be529042..ed080d252f44 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1429,7 +1429,7 @@ bom { ] } } - library("Reactor Bom", "2020.0.15") { + library("Reactor Bom", "2020.0.16-SNAPSHOT") { group("io.projectreactor") { imports = [ "reactor-bom" From 0f630debb3edc1aba072f8da8e842923c4b03b97 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:26:11 +0100 Subject: [PATCH 09/77] Start building against Micrometer 1.7.9 snapshots See gh-29708 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ed080d252f44..f8a033a724f4 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1213,7 +1213,7 @@ bom { ] } } - library("Micrometer", "1.7.8") { + library("Micrometer", "1.7.9-SNAPSHOT") { group("io.micrometer") { modules = [ "micrometer-registry-stackdriver" { From d15149c1a3abff5f905dfb5d2c78fc424b7e5b5f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:26:35 +0100 Subject: [PATCH 10/77] Start building against Spring Framework 5.3.16 snapshots See gh-29709 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index f8a033a724f4..070c663d52c3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1669,7 +1669,7 @@ bom { ] } } - library("Spring Framework", "5.3.15") { + library("Spring Framework", "5.3.16-SNAPSHOT") { group("org.springframework") { imports = [ "spring-framework-bom" From 29d502da5bbe2cbd72d7699fabc6c71e4eb307f6 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:27:05 +0100 Subject: [PATCH 11/77] Start building against Spring LDAP 2.3.6 snapshots See gh-29710 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 070c663d52c3..8028b6f75a6e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1698,7 +1698,7 @@ bom { ] } } - library("Spring LDAP", "2.3.5.RELEASE") { + library("Spring LDAP", "2.3.6.BUILD-SNAPSHOT") { group("org.springframework.ldap") { modules = [ "spring-ldap-core", From cd94b27f2da6d053efa50ad076547430f8513591 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:27:28 +0100 Subject: [PATCH 12/77] Start building against Spring Data 2021.0.9 snapshots See gh-29711 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 8028b6f75a6e..2e7a3205f4bf 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1662,7 +1662,7 @@ bom { ] } } - library("Spring Data Bom", "2021.0.8") { + library("Spring Data Bom", "2021.0.9-SNAPSHOT") { group("org.springframework.data") { imports = [ "spring-data-bom" From b892bb44150e4bf95008c592845192e5c3739498 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:27:52 +0100 Subject: [PATCH 13/77] Start building against Spring Kafka 2.7.11 snapshots See gh-29712 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 2e7a3205f4bf..d6e9c664d84b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1690,7 +1690,7 @@ bom { ] } } - library("Spring Kafka", "2.7.10") { + library("Spring Kafka", "2.7.11-SNAPSHOT") { group("org.springframework.kafka") { modules = [ "spring-kafka", From 3c3ebafa31dd52f7524993edcb903c3827f63d44 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:28:17 +0100 Subject: [PATCH 14/77] Start building against Spring Security 5.5.5 snapshots See gh-29713 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index d6e9c664d84b..6faceca85aae 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1728,7 +1728,7 @@ bom { ] } } - library("Spring Security", "5.5.4") { + library("Spring Security", "5.5.5-SNAPSHOT") { group("org.springframework.security") { imports = [ "spring-security-bom" From 7afd33589f2d35423049169e4c6e584b7cb1afe5 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:28:41 +0100 Subject: [PATCH 15/77] Start building against Spring Batch 4.3.5 snapshots See gh-29714 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 6faceca85aae..aaa7636fcb7c 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1652,7 +1652,7 @@ bom { ] } } - library("Spring Batch", "4.3.4") { + library("Spring Batch", "4.3.5-SNAPSHOT") { group("org.springframework.batch") { modules = [ "spring-batch-core", From e242dc5ce834948621571581e0575235d4c1f8cd Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:29:06 +0100 Subject: [PATCH 16/77] Start building against Spring Session 2021.0.5 snapshots See gh-29715 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index aaa7636fcb7c..e442c62881ef 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1740,7 +1740,7 @@ bom { } } } - library("Spring Session Bom", "2021.0.4") { + library("Spring Session Bom", "2021.0.5-SNAPSHOT") { group("org.springframework.session") { imports = [ "spring-session-bom" From 0297437fc5cd6d8c3a4f312fb26f365c5a845edd Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:33:13 +0100 Subject: [PATCH 17/77] Start building against Reactor 2020.0.16 snapshots See gh-29717 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 6a1145f4ad4b..bce89c9cf1c1 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1404,7 +1404,7 @@ bom { ] } } - library("Reactor Bom", "2020.0.15") { + library("Reactor Bom", "2020.0.16-SNAPSHOT") { group("io.projectreactor") { imports = [ "reactor-bom" From cebba5a6d0ab7b185e1861747bd6c48cdb418af6 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:34:14 +0100 Subject: [PATCH 18/77] Start building against Micrometer 1.8.3 snapshots See gh-29718 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index bce89c9cf1c1..f1d662026f7f 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1225,7 +1225,7 @@ bom { ] } } - library("Micrometer", "1.8.2") { + library("Micrometer", "1.8.3-SNAPSHOT") { group("io.micrometer") { modules = [ "micrometer-registry-stackdriver" { From f6cf1987672b3fc748934379bb006a55ccbbbe2e Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:34:35 +0100 Subject: [PATCH 19/77] Start building against Spring Framework 5.3.16 snapshots See gh-29719 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index f1d662026f7f..a2ff0ec01568 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1648,7 +1648,7 @@ bom { ] } } - library("Spring Framework", "5.3.15") { + library("Spring Framework", "5.3.16-SNAPSHOT") { group("org.springframework") { imports = [ "spring-framework-bom" From 2b87d8364db5bb8384d598b92b9a16f0293f1773 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:35:01 +0100 Subject: [PATCH 20/77] Start building against Spring LDAP 2.3.6 snapshots See gh-29720 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index a2ff0ec01568..0bbe6029fc6e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1677,7 +1677,7 @@ bom { ] } } - library("Spring LDAP", "2.3.5.RELEASE") { + library("Spring LDAP", "2.3.6.BUILD-SNAPSHOT") { group("org.springframework.ldap") { modules = [ "spring-ldap-core", From 1ce07cfe2b06de278840d3f7b6d85dead11a3992 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:35:25 +0100 Subject: [PATCH 21/77] Start building against Spring Data 2021.1.2 snapshots See gh-29721 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0bbe6029fc6e..bf39a2cfc1de 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1641,7 +1641,7 @@ bom { ] } } - library("Spring Data Bom", "2021.1.1") { + library("Spring Data Bom", "2021.1.2-SNAPSHOT") { group("org.springframework.data") { imports = [ "spring-data-bom" From 56ed5fb68c77ef38a0ed07dff71acbe219ba5b95 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:36:24 +0100 Subject: [PATCH 22/77] Start building against Spring Security 5.6.2 See gh-29723 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index bf39a2cfc1de..c0e40dd1a5d3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1707,7 +1707,7 @@ bom { ] } } - library("Spring Security", "5.6.1") { + library("Spring Security", "5.6.2-SNAPSHOT") { group("org.springframework.security") { imports = [ "spring-security-bom" From 9006fdec506942c9e8dc7ce34a4f20ce97018c55 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:36:47 +0100 Subject: [PATCH 23/77] Start building against Spring Batch 4.3.5 snapshots See gh-29724 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index c0e40dd1a5d3..0ad38f05bbd7 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1631,7 +1631,7 @@ bom { ] } } - library("Spring Batch", "4.3.4") { + library("Spring Batch", "4.3.5-SNAPSHOT") { group("org.springframework.batch") { modules = [ "spring-batch-core", From d8454f87585aff0e621d7ddf5f55f21c896ea9ba Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 11 Feb 2022 09:37:10 +0100 Subject: [PATCH 24/77] Start building against Spring Session 2021.1.2 snapshots See gh-29725 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0ad38f05bbd7..cb98fe496eb9 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1714,7 +1714,7 @@ bom { ] } } - library("Spring Session Bom", "2021.1.1") { + library("Spring Session Bom", "2021.1.2-SNAPSHOT") { group("org.springframework.session") { imports = [ "spring-session-bom" From c46b45a1e3501f2df4217faf63366fa74f405b33 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Feb 2022 11:34:51 +0000 Subject: [PATCH 25/77] Add dependency management for liquibase-cdi Closes gh-29676 --- spring-boot-project/spring-boot-dependencies/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index e442c62881ef..718978aa932e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1050,6 +1050,7 @@ bom { library("Liquibase", "4.3.5") { group("org.liquibase") { modules = [ + "liquibase-cdi", "liquibase-core" ] plugins = [ From b74f6682542252067ee2c93f430e53dd85d72d69 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Feb 2022 12:09:45 +0000 Subject: [PATCH 26/77] Only auto-configure WebSessionIdResolver in reactive web app Closes gh-29669 --- .../WebSessionIdResolverAutoConfiguration.java | 5 ++++- .../web/reactive/WebFluxAutoConfigurationTests.java | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java index adf1b6f416bf..9b0de66d89b1 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebSessionIdResolverAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -20,6 +20,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.PropertyMapper; @@ -42,6 +44,7 @@ * @since 2.6.0 */ @Configuration(proxyBeanMethods = false) +@ConditionalOnWebApplication(type = Type.REACTIVE) @ConditionalOnClass({ WebSessionManager.class, Mono.class }) @EnableConfigurationProperties({ WebFluxProperties.class, ServerProperties.class }) public class WebSessionIdResolverAutoConfiguration { diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java index 95a37e8c32c2..36b333f1400c 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java @@ -35,12 +35,16 @@ import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration; import org.springframework.boot.autoconfigure.validation.ValidatorAdapter; +import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration.WebFluxConfig; import org.springframework.boot.context.properties.source.MutuallyExclusiveConfigurationPropertiesException; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ContextConsumer; import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner; import org.springframework.boot.web.codec.CodecCustomizer; @@ -615,6 +619,15 @@ void customSessionCookieConfigurationShouldBeApplied() { })); } + @ParameterizedTest + @ValueSource(classes = { ServerProperties.class, WebFluxProperties.class }) + void propertiesAreNotEnabledInNonWebApplication(Class propertiesClass) { + new ApplicationContextRunner() + .withConfiguration(AutoConfigurations.of(WebFluxAutoConfiguration.class, + WebSessionIdResolverAutoConfiguration.class)) + .run((context) -> assertThat(context).doesNotHaveBean(propertiesClass)); + } + private ContextConsumer assertExchangeWithSession( Consumer exchange) { return (context) -> { From c3eee4ad68ec952f1cb434ae7e5d1405d7cb02f7 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Feb 2022 13:32:52 +0000 Subject: [PATCH 27/77] Align Gradle's plugin's META-INF repackaging with Maven plugin's Closes gh-28562 --- .../tasks/bundling/BootArchiveSupport.java | 11 +++- .../boot/gradle/tasks/bundling/BootJar.java | 6 +- .../boot/gradle/tasks/bundling/BootWar.java | 3 +- .../bundling/AbstractBootArchiveTests.java | 62 ++++++++++++++++++- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java index debc5b5c8fb9..fb7e1a1ff318 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -182,6 +182,15 @@ void moveModuleInfoToRoot(CopySpec spec) { spec.filesMatching("module-info.class", BootArchiveSupport::moveToRoot); } + void moveMetaInfToRoot(CopySpec spec) { + spec.eachFile((file) -> { + String path = file.getRelativeSourcePath().getPathString(); + if (path.startsWith("META-INF/") && !path.equals("META-INF/aop.xml") && !path.endsWith(".kotlin_module")) { + moveToRoot(file); + } + }); + } + private static void moveToRoot(FileCopyDetails details) { details.setRelativePath(details.getRelativeSourcePath()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java index d7569c2e5da2..00c2d7cf2cef 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -91,8 +91,8 @@ public BootJar() { private void configureBootInfSpec(CopySpec bootInfSpec) { bootInfSpec.into("classes", fromCallTo(this::classpathDirectories)); bootInfSpec.into("lib", fromCallTo(this::classpathFiles)).eachFile(this.support::excludeNonZipFiles); - bootInfSpec.filesMatching("module-info.class", - (details) -> details.setRelativePath(details.getRelativeSourcePath())); + this.support.moveModuleInfoToRoot(bootInfSpec); + this.support.moveMetaInfToRoot(bootInfSpec); } private Iterable classpathDirectories() { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java index addcd4021534..24e1de832b33 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -74,6 +74,7 @@ public BootWar() { this.mainClass = project.getObjects().property(String.class); getWebInf().into("lib-provided", fromCallTo(this::getProvidedLibFiles)); this.support.moveModuleInfoToRoot(getRootSpec()); + this.support.moveMetaInfToRoot(getRootSpec()); getRootSpec().eachFile(this.support::excludeNonZipLibraryFiles); project.getConfigurations().all((configuration) -> { ResolvableDependencies incoming = configuration.getIncoming(); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java index 96a14088a192..283c3c04f6c8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -185,6 +185,66 @@ void moduleInfoClassIsPackagedInTheRootOfTheArchive() throws IOException { } } + @Test + void metaInfEntryIsPackagedInTheRootOfTheArchive() throws IOException { + this.task.getMainClass().set("com.example.Main"); + File classpathDirectory = new File(this.temp, "classes"); + File metaInfEntry = new File(classpathDirectory, "META-INF/test"); + metaInfEntry.getParentFile().mkdirs(); + metaInfEntry.createNewFile(); + File applicationClass = new File(classpathDirectory, "com/example/Application.class"); + applicationClass.getParentFile().mkdirs(); + applicationClass.createNewFile(); + this.task.classpath(classpathDirectory); + executeTask(); + try (JarFile jarFile = new JarFile(this.task.getArchiveFile().get().getAsFile())) { + assertThat(jarFile.getEntry(this.classesPath + "com/example/Application.class")).isNotNull(); + assertThat(jarFile.getEntry("com/example/Application.class")).isNull(); + assertThat(jarFile.getEntry(this.classesPath + "META-INF/test")).isNull(); + assertThat(jarFile.getEntry("META-INF/test")).isNotNull(); + } + } + + @Test + void aopXmlIsPackagedBeneathClassesDirectory() throws IOException { + this.task.getMainClass().set("com.example.Main"); + File classpathDirectory = new File(this.temp, "classes"); + File aopXml = new File(classpathDirectory, "META-INF/aop.xml"); + aopXml.getParentFile().mkdirs(); + aopXml.createNewFile(); + File applicationClass = new File(classpathDirectory, "com/example/Application.class"); + applicationClass.getParentFile().mkdirs(); + applicationClass.createNewFile(); + this.task.classpath(classpathDirectory); + executeTask(); + try (JarFile jarFile = new JarFile(this.task.getArchiveFile().get().getAsFile())) { + assertThat(jarFile.getEntry(this.classesPath + "com/example/Application.class")).isNotNull(); + assertThat(jarFile.getEntry("com/example/Application.class")).isNull(); + assertThat(jarFile.getEntry(this.classesPath + "META-INF/aop.xml")).isNotNull(); + assertThat(jarFile.getEntry("META-INF/aop.xml")).isNull(); + } + } + + @Test + void kotlinModuleIsPackagedBeneathClassesDirectory() throws IOException { + this.task.getMainClass().set("com.example.Main"); + File classpathDirectory = new File(this.temp, "classes"); + File kotlinModule = new File(classpathDirectory, "META-INF/example.kotlin_module"); + kotlinModule.getParentFile().mkdirs(); + kotlinModule.createNewFile(); + File applicationClass = new File(classpathDirectory, "com/example/Application.class"); + applicationClass.getParentFile().mkdirs(); + applicationClass.createNewFile(); + this.task.classpath(classpathDirectory); + executeTask(); + try (JarFile jarFile = new JarFile(this.task.getArchiveFile().get().getAsFile())) { + assertThat(jarFile.getEntry(this.classesPath + "com/example/Application.class")).isNotNull(); + assertThat(jarFile.getEntry("com/example/Application.class")).isNull(); + assertThat(jarFile.getEntry(this.classesPath + "META-INF/example.kotlin_module")).isNotNull(); + assertThat(jarFile.getEntry("META-INF/example.kotlin_module")).isNull(); + } + } + @Test void classpathCanBeSetUsingAFileCollection() throws IOException { this.task.getMainClass().set("com.example.Main"); From 387795d4db15022ec94ad6b53f846514217ed66e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Feb 2022 14:09:53 +0000 Subject: [PATCH 28/77] Remove trailing space from media type for ots mapping The regular expression in the new test is intended to match the documented [1] ABNF for a media type: type-name = reg-name subtype-name = reg-name reg-name = 1*127reg-name-chars reg-name-chars = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "." / "+" / "-" / "^" / "_" Closes gh-29746 [1] https://datatracker.ietf.org/doc/html/rfc4288#section-4.2 --- .../springframework/boot/web/server/MimeMappings.java | 4 ++-- .../boot/web/server/MimeMappingsTests.java | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java index 2cda5234e8c5..3928bcc2bb70 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/MimeMappings.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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. @@ -128,7 +128,7 @@ public final class MimeMappings implements Iterable { mappings.add("otg", "application/vnd.oasis.opendocument.graphics-template"); mappings.add("oth", "application/vnd.oasis.opendocument.text-web"); mappings.add("otp", "application/vnd.oasis.opendocument.presentation-template"); - mappings.add("ots", "application/vnd.oasis.opendocument.spreadsheet-template "); + mappings.add("ots", "application/vnd.oasis.opendocument.spreadsheet-template"); mappings.add("ott", "application/vnd.oasis.opendocument.text-template"); mappings.add("ogx", "application/ogg"); mappings.add("ogv", "video/ogg"); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java index 7c8e2347dd4b..b28a8e5dcc77 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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. @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.regex.Pattern; import org.junit.jupiter.api.Test; @@ -135,4 +136,11 @@ void makeUnmodifiable() { assertThat(unmodifiable.get("foo")).isNull(); } + @Test + void mimeTypesInDefaultMappingsAreCorrectlyStructured() { + String regName = "[A-Za-z0-9!#$&.+\\-^_]{1,127}"; + Pattern pattern = Pattern.compile("^" + regName + "\\/" + regName + "$"); + assertThat(MimeMappings.DEFAULT).allSatisfy((mapping) -> assertThat(mapping.getMimeType()).matches(pattern)); + } + } From 09f51f38d6b110fe46b1a8abe12420c3324ba1c3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Feb 2022 15:37:10 +0000 Subject: [PATCH 29/77] Update docs to reflect use of CamelCaseToUnderscoresNamingStrategy Closes gh-29743 --- .../src/docs/asciidoc/howto/data-access.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc index aba533688468..4947302f06f0 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/data-access.adoc @@ -239,8 +239,11 @@ Hibernate uses {hibernate-docs}#naming[two different naming strategies] to map n The fully qualified class name of the physical and the implicit strategy implementations can be configured by setting the `spring.jpa.hibernate.naming.physical-strategy` and `spring.jpa.hibernate.naming.implicit-strategy` properties, respectively. Alternatively, if `ImplicitNamingStrategy` or `PhysicalNamingStrategy` beans are available in the application context, Hibernate will be automatically configured to use them. -By default, Spring Boot configures the physical naming strategy with `SpringPhysicalNamingStrategy`. -This implementation provides the same table structure as Hibernate 4: all dots are replaced by underscores and camel casing is replaced by underscores as well. Additionally, by default, all table names are generated in lower case. For example, a `TelephoneNumber` entity is mapped to the `telephone_number` table. If your schema requires mixed-case identifiers, define a custom `SpringPhysicalNamingStrategy` bean, as shown in the following example: +By default, Spring Boot configures the physical naming strategy with `CamelCaseToUnderscoresNamingStrategy`. +Using this strategy, all dots are replaced by underscores and camel casing is replaced by underscores as well. +Additionally, by default, all table names are generated in lower case. +For example, a `TelephoneNumber` entity is mapped to the `telephone_number` table. +If your schema requires mixed-case identifiers, define a custom `CamelCaseToUnderscoresNamingStrategy` bean, as shown in the following example: [source,java,indent=0,subs="verbatim"] ---- From f80490bafbf6f764b81908fba9a46ec39ab9772f Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Fri, 11 Feb 2022 14:44:28 -0600 Subject: [PATCH 30/77] Precompute Spring Boot version at build time Closes gh-29670 --- .../build/GeneratePropertiesResource.java | 81 +++++++++++++++++++ .../boot/build/JavaConventions.java | 49 ++++++----- .../boot/build/ConventionsPluginTests.java | 10 +++ .../boot/SpringBootVersion.java | 65 +++++---------- 4 files changed, 141 insertions(+), 64 deletions(-) create mode 100644 buildSrc/src/main/java/org/springframework/boot/build/GeneratePropertiesResource.java diff --git a/buildSrc/src/main/java/org/springframework/boot/build/GeneratePropertiesResource.java b/buildSrc/src/main/java/org/springframework/boot/build/GeneratePropertiesResource.java new file mode 100644 index 000000000000..7f766ac0a8e9 --- /dev/null +++ b/buildSrc/src/main/java/org/springframework/boot/build/GeneratePropertiesResource.java @@ -0,0 +1,81 @@ +/* + * Copyright 2012-2022 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.boot.build; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashMap; +import java.util.Map; + +import org.gradle.api.DefaultTask; +import org.gradle.api.Task; +import org.gradle.api.file.DirectoryProperty; +import org.gradle.api.model.ObjectFactory; +import org.gradle.api.provider.Property; +import org.gradle.api.tasks.Input; +import org.gradle.api.tasks.OutputDirectory; +import org.gradle.api.tasks.TaskAction; + +/** + * {@link Task} to generate properties and write them to disk as a properties file. + * + * @author Scott Frederick + */ +public class GeneratePropertiesResource extends DefaultTask { + + private final Property propertiesFileName; + + private final DirectoryProperty destinationDirectory; + + private final Map properties = new HashMap<>(); + + public GeneratePropertiesResource() { + ObjectFactory objects = getProject().getObjects(); + this.propertiesFileName = objects.property(String.class); + this.destinationDirectory = objects.directoryProperty(); + } + + @OutputDirectory + public DirectoryProperty getDestinationDirectory() { + return this.destinationDirectory; + } + + @Input + public Property getPropertiesFileName() { + return this.propertiesFileName; + } + + public void property(String name, String value) { + this.properties.put(name, value); + } + + @Input + public Map getProperties() { + return this.properties; + } + + @TaskAction + void generatePropertiesFile() throws IOException { + File outputFile = this.destinationDirectory.file(this.propertiesFileName).get().getAsFile(); + try (PrintWriter writer = new PrintWriter(new FileWriter(outputFile))) { + this.properties.forEach((key, value) -> writer.printf("%s=%s\n", key, value)); + } + } + +} diff --git a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java index d82ba98cec53..8fd944299fbe 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -104,6 +104,8 @@ class JavaConventions { private static final String SOURCE_AND_TARGET_COMPATIBILITY = "1.8"; + private static final String SPRING_BOOT_PROPERTIES_FILE = "spring-boot.properties"; + void apply(Project project) { project.getPlugins().withType(JavaBasePlugin.class, (java) -> { project.getPlugins().apply(TestFailuresPlugin.class); @@ -112,6 +114,7 @@ void apply(Project project) { configureJavadocConventions(project); configureTestConventions(project); configureJarManifestConventions(project); + configureMetaInfResourcesConventions(project); configureDependencyManagement(project); configureToolchain(project); configureProhibitedDependencyChecks(project); @@ -119,29 +122,37 @@ void apply(Project project) { } private void configureJarManifestConventions(Project project) { - ExtractResources extractLegalResources = project.getTasks().create("extractLegalResources", - ExtractResources.class); - extractLegalResources.getDestinationDirectory().set(project.getLayout().getBuildDirectory().dir("legal")); - extractLegalResources.setResourcesNames(Arrays.asList("LICENSE.txt", "NOTICE.txt")); - extractLegalResources.property("version", project.getVersion().toString()); SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class); Set sourceJarTaskNames = sourceSets.stream().map(SourceSet::getSourcesJarTaskName) .collect(Collectors.toSet()); Set javadocJarTaskNames = sourceSets.stream().map(SourceSet::getJavadocJarTaskName) .collect(Collectors.toSet()); - project.getTasks().withType(Jar.class, (jar) -> project.afterEvaluate((evaluated) -> { - jar.metaInf((metaInf) -> metaInf.from(extractLegalResources)); - jar.manifest((manifest) -> { - Map attributes = new TreeMap<>(); - attributes.put("Automatic-Module-Name", project.getName().replace("-", ".")); - attributes.put("Build-Jdk-Spec", SOURCE_AND_TARGET_COMPATIBILITY); - attributes.put("Built-By", "Spring"); - attributes.put("Implementation-Title", - determineImplementationTitle(project, sourceJarTaskNames, javadocJarTaskNames, jar)); - attributes.put("Implementation-Version", project.getVersion()); - manifest.attributes(attributes); - }); - })); + project.getTasks().withType(Jar.class, + (jar) -> project.afterEvaluate((evaluated) -> jar.manifest((manifest) -> { + Map attributes = new TreeMap<>(); + attributes.put("Automatic-Module-Name", project.getName().replace("-", ".")); + attributes.put("Build-Jdk-Spec", SOURCE_AND_TARGET_COMPATIBILITY); + attributes.put("Built-By", "Spring"); + attributes.put("Implementation-Title", + determineImplementationTitle(project, sourceJarTaskNames, javadocJarTaskNames, jar)); + attributes.put("Implementation-Version", project.getVersion()); + manifest.attributes(attributes); + }))); + } + + private void configureMetaInfResourcesConventions(Project project) { + ExtractResources extractLegalResources = project.getTasks().create("extractLegalResources", + ExtractResources.class); + extractLegalResources.getDestinationDirectory().set(project.getLayout().getBuildDirectory().dir("legal")); + extractLegalResources.setResourcesNames(Arrays.asList("LICENSE.txt", "NOTICE.txt")); + extractLegalResources.property("version", project.getVersion().toString()); + GeneratePropertiesResource generateInfo = project.getTasks().create("generateSpringBootInfo", + GeneratePropertiesResource.class); + generateInfo.getDestinationDirectory().set(project.getLayout().getBuildDirectory().dir("info")); + generateInfo.getPropertiesFileName().set(SPRING_BOOT_PROPERTIES_FILE); + generateInfo.property("version", project.getVersion().toString()); + project.getTasks().withType(Jar.class, (jar) -> project.afterEvaluate( + (evaluated) -> jar.metaInf((metaInf) -> metaInf.from(extractLegalResources, generateInfo)))); } private String determineImplementationTitle(Project project, Set sourceJarTaskNames, diff --git a/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java b/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java index 8bfd16d5867b..9ac6a05dcdae 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java @@ -83,6 +83,7 @@ void jarIncludesLegalFiles() throws IOException { try (JarFile jar = new JarFile(file)) { assertThatLicenseIsPresent(jar); assertThatNoticeIsPresent(jar); + assertThatSpringBootPropertiesIsPresent(jar); Attributes mainAttributes = jar.getManifest().getMainAttributes(); assertThat(mainAttributes.getValue("Implementation-Title")) .isEqualTo("Test project for manifest customization"); @@ -112,6 +113,7 @@ void sourceJarIsBuilt() throws IOException { try (JarFile jar = new JarFile(file)) { assertThatLicenseIsPresent(jar); assertThatNoticeIsPresent(jar); + assertThatSpringBootPropertiesIsPresent(jar); Attributes mainAttributes = jar.getManifest().getMainAttributes(); assertThat(mainAttributes.getValue("Implementation-Title")) .isEqualTo("Source for " + this.projectDir.getName()); @@ -141,6 +143,7 @@ void javadocJarIsBuilt() throws IOException { try (JarFile jar = new JarFile(file)) { assertThatLicenseIsPresent(jar); assertThatNoticeIsPresent(jar); + assertThatSpringBootPropertiesIsPresent(jar); Attributes mainAttributes = jar.getManifest().getMainAttributes(); assertThat(mainAttributes.getValue("Implementation-Title")) .isEqualTo("Javadoc for " + this.projectDir.getName()); @@ -165,6 +168,13 @@ private void assertThatNoticeIsPresent(JarFile jar) throws IOException { assertThat(noticeContent).doesNotContain("${"); } + private void assertThatSpringBootPropertiesIsPresent(JarFile jar) throws IOException { + JarEntry properties = jar.getJarEntry("META-INF/spring-boot.properties"); + assertThat(properties).isNotNull(); + String content = FileCopyUtils.copyToString(new InputStreamReader(jar.getInputStream(properties))); + assertThat(content).contains("version="); + } + @Test void testRetryIsConfiguredWithThreeRetriesOnCI() throws IOException { try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootVersion.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootVersion.java index dc5904d84586..f5074618008a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootVersion.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringBootVersion.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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. @@ -16,30 +16,22 @@ package org.springframework.boot; -import java.io.File; import java.io.IOException; -import java.net.JarURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.security.CodeSource; -import java.util.jar.Attributes; -import java.util.jar.Attributes.Name; -import java.util.jar.JarFile; +import java.io.InputStream; +import java.util.Properties; /** - * Class that exposes the Spring Boot version. Fetches the - * {@link Name#IMPLEMENTATION_VERSION Implementation-Version} manifest attribute from the - * jar file via {@link Package#getImplementationVersion()}, falling back to locating the - * jar file that contains this class and reading the {@code Implementation-Version} - * attribute from its manifest. - *

- * This class might not be able to determine the Spring Boot version in all environments. - * Consider using a reflection-based check instead: For example, checking for the presence - * of a specific Spring Boot method that you intend to call. + * Exposes the Spring Boot version. + * + * The version information is read from a file that is stored in the Spring Boot library. + * If the version information cannot be read from the file, consider using a + * reflection-based check instead (for example, checking for the presence of a specific + * Spring Boot method that you intend to call). * * @author Drummond Dawson * @author Hendrig Sellik * @author Andy Wilkinson + * @author Scott Frederick * @since 1.3.0 */ public final class SpringBootVersion { @@ -51,38 +43,21 @@ private SpringBootVersion() { * Return the full version string of the present Spring Boot codebase, or {@code null} * if it cannot be determined. * @return the version of Spring Boot or {@code null} - * @see Package#getImplementationVersion() */ public static String getVersion() { - return determineSpringBootVersion(); - } - - private static String determineSpringBootVersion() { - String implementationVersion = SpringBootVersion.class.getPackage().getImplementationVersion(); - if (implementationVersion != null) { - return implementationVersion; - } - CodeSource codeSource = SpringBootVersion.class.getProtectionDomain().getCodeSource(); - if (codeSource == null) { - return null; - } - URL codeSourceLocation = codeSource.getLocation(); - try { - URLConnection connection = codeSourceLocation.openConnection(); - if (connection instanceof JarURLConnection) { - return getImplementationVersion(((JarURLConnection) connection).getJarFile()); + InputStream input = SpringBootVersion.class.getClassLoader() + .getResourceAsStream("META-INF/spring-boot.properties"); + if (input != null) { + try { + Properties properties = new Properties(); + properties.load(input); + return properties.getProperty("version"); } - try (JarFile jarFile = new JarFile(new File(codeSourceLocation.toURI()))) { - return getImplementationVersion(jarFile); + catch (IOException ex) { + // fall through } } - catch (Exception ex) { - return null; - } - } - - private static String getImplementationVersion(JarFile jarFile) throws IOException { - return jarFile.getManifest().getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION); + return null; } } From db6ef0e802457d1e1bdc34b47189ccaeb350e8a1 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Fri, 11 Feb 2022 15:31:20 -0600 Subject: [PATCH 31/77] Exclude duplicate properties file when building a jar from jars See gh-29670 and gh-23955 --- spring-boot-project/spring-boot-cli/build.gradle | 1 + .../spring-boot-tools/spring-boot-loader-tools/build.gradle | 2 ++ 2 files changed, 3 insertions(+) diff --git a/spring-boot-project/spring-boot-cli/build.gradle b/spring-boot-project/spring-boot-cli/build.gradle index 9608a448dbe6..57bfc1826238 100644 --- a/spring-boot-project/spring-boot-cli/build.gradle +++ b/spring-boot-project/spring-boot-cli/build.gradle @@ -116,6 +116,7 @@ task fullJar(type: Jar) { zipTree(configurations.loader.singleFile).matching { exclude "META-INF/LICENSE.txt" exclude "META-INF/NOTICE.txt" + exclude "META-INF/spring-boot.properties" } } manifest { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle index e00521b9b6df..4f862cfe93de 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/build.gradle @@ -41,6 +41,7 @@ task reproducibleLoaderJar(type: Jar) { zipTree(configurations.loader.incoming.files.singleFile).matching { exclude "META-INF/LICENSE.txt" exclude "META-INF/NOTICE.txt" + exclude "META-INF/spring-boot.properties" } } reproducibleFileOrder = true @@ -55,6 +56,7 @@ task reproducibleJarModeLayerToolsJar(type: Jar) { zipTree(configurations.jarmode.incoming.files.singleFile).matching { exclude "META-INF/LICENSE.txt" exclude "META-INF/NOTICE.txt" + exclude "META-INF/spring-boot.properties" } } reproducibleFileOrder = true From 1f0134505750d9b0da9419699ebd23faff2b5665 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 13 Feb 2022 18:00:45 +0100 Subject: [PATCH 32/77] Fix assertion due to toString change in Spring Framework --- .../boot/context/properties/bind/BindableTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java index 40ac2e6c7dc6..4fcebdf11c96 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -146,7 +146,7 @@ void toStringShouldShowDetails() { Bindable bindable = Bindable.of(String.class).withExistingValue("foo").withAnnotations(annotation); assertThat(bindable.toString()) .contains("type = java.lang.String, value = 'provided', annotations = array[" - + "@org.springframework.boot.context.properties.bind.BindableTests$TestAnnotation()]"); + + "@org.springframework.boot.context.properties.bind.BindableTests.TestAnnotation()]"); } @Test From 9601a3e6bf7ef874a316dce06f7b48d7bd3a2eae Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 13 Feb 2022 18:40:23 +0100 Subject: [PATCH 33/77] Start building against Reactor 2020.0.16 snapshots See gh-29760 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 3aeb67447e09..cbd5d8e0a255 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1418,7 +1418,7 @@ bom { ] } } - library("Reactor Bom", "2020.0.15") { + library("Reactor Bom", "2020.0.16-SNAPSHOT") { group("io.projectreactor") { imports = [ "reactor-bom" From e1c5f219ca708869419bb3d44ef917c5bb4af53b Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sun, 13 Feb 2022 18:41:20 +0100 Subject: [PATCH 34/77] Start building against Spring Framework 5.3.16 snapshots See gh-29761 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index cbd5d8e0a255..2672c75a5dfb 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1664,7 +1664,7 @@ bom { ] } } - library("Spring Framework", "5.3.15") { + library("Spring Framework", "5.3.16-SNAPSHOT") { group("org.springframework") { imports = [ "spring-framework-bom" From 137bcd98b6beee9780f076e4da6001e0ecb0127e Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:19:31 +0100 Subject: [PATCH 35/77] Start building against Micrometer 1.9.0-M3 snapshots See gh-29763 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 2672c75a5dfb..0ee93ebafd9d 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1239,7 +1239,7 @@ bom { ] } } - library("Micrometer", "1.9.0-M2") { + library("Micrometer", "1.9.0-SNAPSHOT") { group("io.micrometer") { modules = [ "micrometer-registry-stackdriver" { From 76039f34640acac489fc7e994df0c035e6f92c55 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:20:03 +0100 Subject: [PATCH 36/77] Start building against Spring LDAP 2.4.0-M2 snapshots See gh-29764 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0ee93ebafd9d..05d9b577f04e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1701,7 +1701,7 @@ bom { ] } } - library("Spring LDAP", "2.4.0-M1") { + library("Spring LDAP", "2.4.0-SNAPSHOT") { group("org.springframework.ldap") { modules = [ "spring-ldap-core", From b2659f5da80e225c120fed0e2e030ae7884a0d2d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:20:28 +0100 Subject: [PATCH 37/77] Start building against Spring Data 2021.2.0-M3 snapshots See gh-29765 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 05d9b577f04e..1cb95725cff8 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1657,7 +1657,7 @@ bom { ] } } - library("Spring Data Bom", "2021.2.0-M2") { + library("Spring Data Bom", "2021.2.0-SNAPSHOT") { group("org.springframework.data") { imports = [ "spring-data-bom" From d925c8d317c276323fa053de9aaa0c20dac27b60 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:21:00 +0100 Subject: [PATCH 38/77] Start building against Spring Security 5.7.0-M2 snapshots See gh-29766 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 1cb95725cff8..421821f33f51 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1731,7 +1731,7 @@ bom { ] } } - library("Spring Security", "5.7.0-M1") { + library("Spring Security", "5.7.0-SNAPSHOT") { group("org.springframework.security") { imports = [ "spring-security-bom" From 15e14e23c99251ba7f750d78e66bcbd12e7f0e9d Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 08:22:13 +0100 Subject: [PATCH 39/77] Start building against Spring Kafka 2.8.3 snapshots See gh-29759 --- .../ConcurrentKafkaListenerContainerFactoryConfigurer.java | 1 + .../boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java | 2 ++ spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java index ffa5987513f1..ef8d008877d6 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/ConcurrentKafkaListenerContainerFactoryConfigurer.java @@ -169,6 +169,7 @@ public void configure(ConcurrentKafkaListenerContainerFactory li configureContainer(listenerFactory.getContainerProperties()); } + @SuppressWarnings("deprecation") private void configureListenerFactory(ConcurrentKafkaListenerContainerFactory factory) { PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull(); Listener properties = this.properties.getListener(); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java index 87050a7ab760..179f0cba8843 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java @@ -512,6 +512,7 @@ void testConcurrentKafkaListenerContainerFactoryWithCustomRecordFilterStrategy() } @Test + @Deprecated void testConcurrentKafkaListenerContainerFactoryWithCustomErrorHandler() { this.contextRunner.withBean("errorHandler", ErrorHandler.class, () -> mock(ErrorHandler.class)) .run((context) -> { @@ -522,6 +523,7 @@ void testConcurrentKafkaListenerContainerFactoryWithCustomErrorHandler() { } @Test + @Deprecated void concurrentKafkaListenerContainerFactoryInBatchModeShouldUseBatchErrorHandler() { this.contextRunner.withBean("batchErrorHandler", BatchErrorHandler.class, () -> mock(BatchErrorHandler.class)) .withPropertyValues("spring.kafka.listener.type=batch").run((context) -> { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 421821f33f51..f8fb23a26d8f 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1693,7 +1693,7 @@ bom { ] } } - library("Spring Kafka", "2.8.2") { + library("Spring Kafka", "2.8.3-SNAPSHOT") { group("org.springframework.kafka") { modules = [ "spring-kafka", diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc index 93d337a2e95d..3886423d9747 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/messaging/kafka.adoc @@ -42,7 +42,7 @@ The following component creates a listener endpoint on the `someTopic` topic: include::code:MyBean[] If a `KafkaTransactionManager` bean is defined, it is automatically associated to the container factory. -Similarly, if a `RecordFilterStrategy`, `ErrorHandler`, `CommonErrorHandler`, `AfterRollbackProcessor` or `ConsumerAwareRebalanceListener` bean is defined, it is automatically associated to the default factory. +Similarly, if a `RecordFilterStrategy`, `CommonErrorHandler`, `AfterRollbackProcessor` or `ConsumerAwareRebalanceListener` bean is defined, it is automatically associated to the default factory. Depending on the listener type, a `RecordMessageConverter` or `BatchMessageConverter` bean is associated to the default factory. If only a `RecordMessageConverter` bean is present for a batch listener, it is wrapped in a `BatchMessageConverter`. From 1fd4a4d86b12b631277675962cbab6b8cf7b7aa3 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 14 Feb 2022 10:25:38 +0000 Subject: [PATCH 40/77] Remove code related to unsupported versions of Gradle Closes gh-29681 --- .../plugin/ApplicationPluginAction.java | 54 ++----------------- .../boot/gradle/plugin/JavaPluginAction.java | 13 ++--- .../gradle/plugin/ResolveMainClassName.java | 8 +-- .../application/CreateBootStartScripts.java | 4 +- .../tasks/buildinfo/BuildInfoProperties.java | 13 ++--- .../boot/gradle/tasks/run/BootRun.java | 13 ++--- 6 files changed, 19 insertions(+), 86 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java index e8e5ee78f6c7..5fbffeaa8731 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ApplicationPluginAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.StringWriter; -import java.lang.reflect.Method; import java.util.concurrent.Callable; import org.gradle.api.GradleException; @@ -30,16 +29,10 @@ import org.gradle.api.distribution.DistributionContainer; import org.gradle.api.file.CopySpec; import org.gradle.api.file.FileCollection; -import org.gradle.api.internal.IConventionAware; import org.gradle.api.plugins.ApplicationPlugin; import org.gradle.api.plugins.ApplicationPluginConvention; -import org.gradle.api.provider.Property; -import org.gradle.api.provider.Provider; import org.gradle.jvm.application.scripts.TemplateBasedScriptGenerator; import org.gradle.jvm.application.tasks.CreateStartScripts; -import org.gradle.util.GradleVersion; - -import org.springframework.boot.gradle.tasks.application.CreateBootStartScripts; /** * Action that is executed in response to the {@link ApplicationPlugin} being applied. @@ -54,9 +47,9 @@ public void execute(Project project) { .getPlugin(ApplicationPluginConvention.class); DistributionContainer distributions = project.getExtensions().getByType(DistributionContainer.class); Distribution distribution = distributions.create("boot"); - configureBaseNameConvention(project, applicationConvention, distribution); - CreateStartScripts bootStartScripts = project.getTasks().create("bootStartScripts", - determineCreateStartScriptsClass()); + distribution.getDistributionBaseName() + .convention((project.provider(() -> applicationConvention.getApplicationName() + "-boot"))); + CreateStartScripts bootStartScripts = project.getTasks().create("bootStartScripts", CreateStartScripts.class); bootStartScripts .setDescription("Generates OS-specific start scripts to run the project as a Spring Boot application."); ((TemplateBasedScriptGenerator) bootStartScripts.getUnixStartScriptGenerator()) @@ -81,45 +74,6 @@ public void execute(Project project) { distribution.getContents().with(binCopySpec); } - private Class determineCreateStartScriptsClass() { - return isGradle64OrLater() ? CreateStartScripts.class : CreateBootStartScripts.class; - } - - private boolean isGradle64OrLater() { - return GradleVersion.current().getBaseVersion().compareTo(GradleVersion.version("6.4")) >= 0; - } - - @SuppressWarnings("unchecked") - private void configureBaseNameConvention(Project project, ApplicationPluginConvention applicationConvention, - Distribution distribution) { - Method getDistributionBaseName = findMethod(distribution.getClass(), "getDistributionBaseName"); - if (getDistributionBaseName != null) { - try { - Property distributionBaseName = (Property) distribution.getClass() - .getMethod("getDistributionBaseName").invoke(distribution); - distributionBaseName.getClass().getMethod("convention", Provider.class).invoke(distributionBaseName, - project.provider(() -> applicationConvention.getApplicationName() + "-boot")); - return; - } - catch (Exception ex) { - // Continue - } - } - if (distribution instanceof IConventionAware) { - ((IConventionAware) distribution).getConventionMapping().map("baseName", - () -> applicationConvention.getApplicationName() + "-boot"); - } - } - - private static Method findMethod(Class type, String name) { - for (Method candidate : type.getMethods()) { - if (candidate.getName().equals(name)) { - return candidate; - } - } - return null; - } - @Override public Class> getPluginClass() { return ApplicationPlugin.class; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java index 61752d116951..0b8c8fb80abd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java @@ -47,7 +47,6 @@ import org.gradle.api.tasks.compile.JavaCompile; import org.gradle.jvm.toolchain.JavaToolchainService; import org.gradle.jvm.toolchain.JavaToolchainSpec; -import org.gradle.util.GradleVersion; import org.springframework.boot.gradle.tasks.bundling.BootBuildImage; import org.springframework.boot.gradle.tasks.bundling.BootJar; @@ -158,15 +157,9 @@ private void configureBootRunTask(Project project) { } private void configureToolchainConvention(Project project, BootRun run) { - if (isGradle67OrLater()) { - JavaToolchainSpec toolchain = project.getExtensions().getByType(JavaPluginExtension.class).getToolchain(); - JavaToolchainService toolchainService = project.getExtensions().getByType(JavaToolchainService.class); - run.getJavaLauncher().convention(toolchainService.launcherFor(toolchain)); - } - } - - private boolean isGradle67OrLater() { - return GradleVersion.current().getBaseVersion().compareTo(GradleVersion.version("6.7")) >= 0; + JavaToolchainSpec toolchain = project.getExtensions().getByType(JavaPluginExtension.class).getToolchain(); + JavaToolchainService toolchainService = project.getExtensions().getByType(JavaToolchainService.class); + run.getJavaLauncher().convention(toolchainService.launcherFor(toolchain)); } private JavaPluginConvention javaPluginConvention(Project project) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ResolveMainClassName.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ResolveMainClassName.java index 0628330f538f..97e7046415f8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ResolveMainClassName.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/ResolveMainClassName.java @@ -176,18 +176,12 @@ static TaskProvider registerForTask(String taskName, Proje return resolveMainClassNameProvider; } - @SuppressWarnings("deprecation") private static String getJavaApplicationMainClass(Convention convention) { JavaApplication javaApplication = convention.findByType(JavaApplication.class); if (javaApplication == null) { return null; } - try { - return javaApplication.getMainClass().getOrNull(); - } - catch (NoSuchMethodError ex) { - return javaApplication.getMainClassName(); - } + return javaApplication.getMainClass().getOrNull(); } private static final class ClassNameReader implements Transformer { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/application/CreateBootStartScripts.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/application/CreateBootStartScripts.java index 634904624198..2fd040e7c8d4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/application/CreateBootStartScripts.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/application/CreateBootStartScripts.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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,9 @@ * * @author Andy Wilkinson * @since 2.0.0 + * @deprecated since 2.5.10 for removal in 2.8.0 in favor of {@link CreateStartScripts}. */ +@Deprecated public class CreateBootStartScripts extends CreateStartScripts { @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoProperties.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoProperties.java index 44d588cedead..d3a0bcedfbc3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoProperties.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/buildinfo/BuildInfoProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2022 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. @@ -66,14 +66,9 @@ public class BuildInfoProperties implements Serializable { } private Provider projectVersion(Project project) { - try { - Provider externalVersionProperty = project.getProviders().gradleProperty("version") - .forUseAtConfigurationTime(); - externalVersionProperty.getOrNull(); - } - catch (NoSuchMethodError ex) { - // Gradle < 6.5 - } + Provider externalVersionProperty = project.getProviders().gradleProperty("version") + .forUseAtConfigurationTime(); + externalVersionProperty.getOrNull(); return project.provider(() -> project.getVersion().toString()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java index dc0572eda687..e08531c414e6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 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. @@ -89,14 +89,9 @@ public void exec() { } private boolean isJava13OrLater() { - try { - Property javaLauncher = this.getJavaLauncher(); - if (javaLauncher.isPresent()) { - return javaLauncher.get().getMetadata().getLanguageVersion().asInt() >= 13; - } - } - catch (NoSuchMethodError ex) { - // Continue + Property javaLauncher = this.getJavaLauncher(); + if (javaLauncher.isPresent()) { + return javaLauncher.get().getMetadata().getLanguageVersion().asInt() >= 13; } for (Method method : String.class.getMethods()) { if (method.getName().equals("stripIndent")) { From 81aec09357410301916f3a1156eac2fa47613ef5 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:01 +0100 Subject: [PATCH 41/77] Upgrade to AppEngine SDK 1.9.94 Closes gh-29767 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 718978aa932e..7d3e35d80cf7 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -63,7 +63,7 @@ bom { ] } } - library("AppEngine SDK", "1.9.93") { + library("AppEngine SDK", "1.9.94") { group("com.google.appengine") { modules = [ "appengine-api-1.0-sdk" From 6c09d4d7a151c7ae0dd82448d6cfae007811decd Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:03 +0100 Subject: [PATCH 42/77] Upgrade to Dropwizard Metrics 4.1.30 Closes gh-29768 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7d3e35d80cf7..928d9bd3bd5c 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -247,7 +247,7 @@ bom { ] } } - library("Dropwizard Metrics", "4.1.29") { + library("Dropwizard Metrics", "4.1.30") { group("io.dropwizard.metrics") { imports = [ "metrics-bom" From 2485c05a50a190ebffec652b1eb64bc7f69b564c Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:04 +0100 Subject: [PATCH 43/77] Upgrade to Glassfish JAXB 2.3.6 Closes gh-29769 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 928d9bd3bd5c..44f15037142a 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -342,7 +342,7 @@ bom { ] } } - library("Glassfish JAXB", "2.3.5") { + library("Glassfish JAXB", "2.3.6") { prohibit("[3.0.0-M1,)") { because "it uses the jakarta.* namespace" } From 1cdb75f7805eab38c80a87e6b6479b4657885194 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:05 +0100 Subject: [PATCH 44/77] Upgrade to Hibernate Validator 6.2.2.Final Closes gh-29770 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 44f15037142a..4307975740a3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -435,7 +435,7 @@ bom { ] } } - library("Hibernate Validator", "6.2.0.Final") { + library("Hibernate Validator", "6.2.2.Final") { prohibit("[7.0.0.Alpha1,)") { because "it uses the jakarta.* namespace" } From a99582a3bb9073cd15d22fcbcfabca56ba28ea80 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:06 +0100 Subject: [PATCH 45/77] Upgrade to Jetty 9.4.45.v20220203 Closes gh-29771 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../smoketest/jetty/jsp/SampleWebJspApplicationTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 4307975740a3..0c28371393eb 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -899,7 +899,7 @@ bom { ] } } - library("Jetty", "9.4.44.v20210927") { + library("Jetty", "9.4.45.v20220203") { prohibit("[11.0.0-alpha0,)") { because "it uses the jakarta.* namespace" } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java index 22dd4b5882cb..359b8ec26c97 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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 @@ static class JettyCustomizerConfig { JettyServerCustomizer jettyServerCustomizer() { return (server) -> { ContextHandler handler = (ContextHandler) server.getHandler(); - handler.addAliasCheck(new ContextHandler.ApproveAliases()); + handler.addAliasCheck((path, resource) -> true); }; } From 7de763f2d7cff9ea91fb3a266d9d4604461f96d9 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:07 +0100 Subject: [PATCH 46/77] Upgrade to Johnzon 1.2.16 Closes gh-29772 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0c28371393eb..d94358a2b8ab 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -916,7 +916,7 @@ bom { ] } } - library("Johnzon", "1.2.15") { + library("Johnzon", "1.2.16") { group("org.apache.johnzon") { modules = [ "johnzon-core", From 4f98bfd39d0246d54db39d52080d7fee5a14ce8c Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:09 +0100 Subject: [PATCH 47/77] Upgrade to Json-smart 2.4.8 Closes gh-29773 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index d94358a2b8ab..fbbca2d73792 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -960,7 +960,7 @@ bom { ] } } - library("Json-smart", "2.4.7") { + library("Json-smart", "2.4.8") { group("net.minidev") { modules = [ "json-smart" From f29152496a53bd8a4263d59882f350a2726173ac Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:10 +0100 Subject: [PATCH 48/77] Upgrade to Neo4j Java Driver 4.2.9 Closes gh-29774 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index fbbca2d73792..0789e8167c99 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1276,7 +1276,7 @@ bom { ] } } - library("Neo4j Java Driver", "4.2.8") { + library("Neo4j Java Driver", "4.2.9") { group("org.neo4j.driver") { modules = [ "neo4j-java-driver" From 66cc3e7730d8017195a604c4b4f9434c03cf191f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:11 +0100 Subject: [PATCH 49/77] Upgrade to Netty 4.1.74.Final Closes gh-29775 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 0789e8167c99..78152e97379c 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1283,7 +1283,7 @@ bom { ] } } - library("Netty", "4.1.73.Final") { + library("Netty", "4.1.74.Final") { group("io.netty") { imports = [ "netty-bom" From 1c1bf932b2ca3e5480423ac3d2087225f1a61427 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:12 +0100 Subject: [PATCH 50/77] Upgrade to Netty tcNative 2.0.48.Final Closes gh-29776 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 78152e97379c..fe7b34237d88 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1290,7 +1290,7 @@ bom { ] } } - library("Netty tcNative", "2.0.47.Final") { + library("Netty tcNative", "2.0.48.Final") { group("io.netty") { modules = [ "netty-tcnative", From ea609ae6972ec277f19add6da3ea42c4446b0575 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:14 +0100 Subject: [PATCH 51/77] Upgrade to Postgresql 42.2.25 Closes gh-29777 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index fe7b34237d88..68eec91e10d5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1371,7 +1371,7 @@ bom { ] } } - library("Postgresql", "42.2.24") { + library("Postgresql", "42.2.25") { group("org.postgresql") { modules = [ "postgresql" From 0440147f412a3935c852da07e46058183fe0c605 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:15 +0100 Subject: [PATCH 52/77] Upgrade to SLF4J 1.7.36 Closes gh-29778 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 68eec91e10d5..4bf54f013452 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1601,7 +1601,7 @@ bom { ] } } - library("SLF4J", "1.7.33") { + library("SLF4J", "1.7.36") { group("org.slf4j") { modules = [ "jcl-over-slf4j", From e9eba82c6c5469700f612f0ad0060fe1b1d5d604 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:16 +0100 Subject: [PATCH 53/77] Upgrade to Thymeleaf 3.0.15.RELEASE Closes gh-29779 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 4bf54f013452..99a204310240 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1776,7 +1776,7 @@ bom { ] } } - library("Thymeleaf", "3.0.14.RELEASE") { + library("Thymeleaf", "3.0.15.RELEASE") { group("org.thymeleaf") { modules = [ "thymeleaf", From 2207bd88761cd0739e042732479a773db92e9c17 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:17 +0100 Subject: [PATCH 54/77] Upgrade to Tomcat 9.0.58 Closes gh-29780 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 62b45ba0718f..d676c0212bb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,6 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 kotlinVersion=1.5.32 -tomcatVersion=9.0.56 +tomcatVersion=9.0.58 kotlin.stdlib.default.dependency=false From 4ee7b4b25ab96623f3c4ec140a4a2a91566dab1a Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 09:01:19 +0100 Subject: [PATCH 55/77] Upgrade to Undertow 2.2.16.Final Closes gh-29781 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 99a204310240..442118f19713 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1839,7 +1839,7 @@ bom { ] } } - library("Undertow", "2.2.14.Final") { + library("Undertow", "2.2.16.Final") { group("io.undertow") { modules = [ "undertow-core", From 32dda9e730d6fbf7f2d92936b305e3aeab6f03c3 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:48 +0100 Subject: [PATCH 56/77] Upgrade to AppEngine SDK 1.9.94 Closes gh-29783 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7c6889dfe1b6..7a181ef46950 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -63,7 +63,7 @@ bom { ] } } - library("AppEngine SDK", "1.9.93") { + library("AppEngine SDK", "1.9.94") { group("com.google.appengine") { modules = [ "appengine-api-1.0-sdk" From 7016693f0ec6758de48d9ad64bc03db98e94d895 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:50 +0100 Subject: [PATCH 57/77] Upgrade to Artemis 2.19.1 Closes gh-29784 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7a181ef46950..5b23ace79bbd 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -70,7 +70,7 @@ bom { ] } } - library("Artemis", "2.19.0") { + library("Artemis", "2.19.1") { group("org.apache.activemq") { modules = [ "artemis-amqp-protocol", From 7375a5f52f5ecdd6077a583401129418f91d9d30 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:51 +0100 Subject: [PATCH 58/77] Upgrade to Couchbase Client 3.2.5 Closes gh-29785 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 5b23ace79bbd..df51fac8b2c3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -218,7 +218,7 @@ bom { ] } } - library("Couchbase Client", "3.2.4") { + library("Couchbase Client", "3.2.5") { group("com.couchbase.client") { modules = [ "java-client" From e5f399b005c4f22fe1b1a4ea21ae245c979895a5 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:53 +0100 Subject: [PATCH 59/77] Upgrade to Dropwizard Metrics 4.2.8 Closes gh-29786 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index df51fac8b2c3..8c59d5cf6d63 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -250,7 +250,7 @@ bom { ] } } - library("Dropwizard Metrics", "4.2.7") { + library("Dropwizard Metrics", "4.2.8") { group("io.dropwizard.metrics") { imports = [ "metrics-bom" From 7800c9b1de8d512560b1507e080c4aa3821fe31b Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:54 +0100 Subject: [PATCH 60/77] Upgrade to Glassfish JAXB 2.3.6 Closes gh-29787 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 8c59d5cf6d63..78614383e73b 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -348,7 +348,7 @@ bom { ] } } - library("Glassfish JAXB", "2.3.5") { + library("Glassfish JAXB", "2.3.6") { prohibit("[3.0.0-M1,)") { because "it uses the jakarta.* namespace" } From 60cf736e280a066e0a6acdc70c41a147745d5612 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:56 +0100 Subject: [PATCH 61/77] Upgrade to Hibernate 5.6.5.Final Closes gh-29788 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 78614383e73b..237102ac8804 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -418,7 +418,7 @@ bom { ] } } - library("Hibernate", "5.6.4.Final") { + library("Hibernate", "5.6.5.Final") { prohibit("[6.0.0.Alpha2,)") { because "it uses the jakarta.* namespace" } From f2ab9c3b10f64b5d5f29f65c84ab3c2416dc6163 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:57 +0100 Subject: [PATCH 62/77] Upgrade to Hibernate Validator 6.2.2.Final Closes gh-29789 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 237102ac8804..4de5dbad451d 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -441,7 +441,7 @@ bom { ] } } - library("Hibernate Validator", "6.2.0.Final") { + library("Hibernate Validator", "6.2.2.Final") { prohibit("[7.0.0.Alpha1,)") { because "it uses the jakarta.* namespace" } From 96e4cbbe04bfa123e0af76248653358592558ddd Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:15:59 +0100 Subject: [PATCH 63/77] Upgrade to HttpClient5 5.1.3 Closes gh-29790 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 4de5dbad451d..b901899325b3 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -504,7 +504,7 @@ bom { ] } } - library("HttpClient5", "5.1.2") { + library("HttpClient5", "5.1.3") { group("org.apache.httpcomponents.client5") { modules = [ "httpclient5", From dc171c6462eaf32ae0282400f2960818a9f74b1e Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:00 +0100 Subject: [PATCH 64/77] Upgrade to Jetty 9.4.45.v20220203 Closes gh-29791 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../smoketest/jetty/jsp/SampleWebJspApplicationTests.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index b901899325b3..ddcabadfc3e5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -904,7 +904,7 @@ bom { ] } } - library("Jetty", "9.4.44.v20210927") { + library("Jetty", "9.4.45.v20220203") { prohibit("[10.0.0-alpha0,)") { because "it requires Java 11" } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java index 22dd4b5882cb..359b8ec26c97 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-jsp/src/test/java/smoketest/jetty/jsp/SampleWebJspApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2022 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 @@ static class JettyCustomizerConfig { JettyServerCustomizer jettyServerCustomizer() { return (server) -> { ContextHandler handler = (ContextHandler) server.getHandler(); - handler.addAliasCheck(new ContextHandler.ApproveAliases()); + handler.addAliasCheck((path, resource) -> true); }; } From 82a0491afdb94351aba250f4f42469393ab68eb7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:02 +0100 Subject: [PATCH 65/77] Upgrade to Johnzon 1.2.16 Closes gh-29793 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ddcabadfc3e5..cab3e8e890e1 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -924,7 +924,7 @@ bom { ] } } - library("Johnzon", "1.2.15") { + library("Johnzon", "1.2.16") { group("org.apache.johnzon") { modules = [ "johnzon-core", From b1160d676d11ded745a19677f116bde35c1744ef Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:04 +0100 Subject: [PATCH 66/77] Upgrade to Json-smart 2.4.8 Closes gh-29794 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index cab3e8e890e1..13326334511e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -971,7 +971,7 @@ bom { ] } } - library("Json-smart", "2.4.7") { + library("Json-smart", "2.4.8") { group("net.minidev") { modules = [ "json-smart" From dd293cd86c23a707d45c6321785ae3345068ed30 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:06 +0100 Subject: [PATCH 67/77] Upgrade to Maven Javadoc Plugin 3.3.2 Closes gh-29795 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 13326334511e..93dd3befe465 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1184,7 +1184,7 @@ bom { ] } } - library("Maven Javadoc Plugin", "3.3.1") { + library("Maven Javadoc Plugin", "3.3.2") { group("org.apache.maven.plugins") { plugins = [ "maven-javadoc-plugin" From 57bc5136f5efe8a9a5e77fc909c10769a521e2a7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:07 +0100 Subject: [PATCH 68/77] Upgrade to MongoDB 4.4.2 Closes gh-29796 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 93dd3befe465..54aa0c2c5857 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1254,7 +1254,7 @@ bom { ] } } - library("MongoDB", "4.4.1") { + library("MongoDB", "4.4.2") { group("org.mongodb") { modules = [ "bson", From bb336e5e7bc82d8f404634ac42ba072870899805 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:09 +0100 Subject: [PATCH 69/77] Upgrade to Neo4j Java Driver 4.4.3 Closes gh-29797 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 54aa0c2c5857..40751d47d06f 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1288,7 +1288,7 @@ bom { ] } } - library("Neo4j Java Driver", "4.4.2") { + library("Neo4j Java Driver", "4.4.3") { group("org.neo4j.driver") { modules = [ "neo4j-java-driver" From 185c4968c2d0d9309b6e38a2e2a63790c4f03325 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:10 +0100 Subject: [PATCH 70/77] Upgrade to Netty 4.1.74.Final Closes gh-29798 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 40751d47d06f..c587bcb46e21 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1295,7 +1295,7 @@ bom { ] } } - library("Netty", "4.1.73.Final") { + library("Netty", "4.1.74.Final") { group("io.netty") { imports = [ "netty-bom" From b73c67e53eddc6ba1157f31cbbbd2c977c08e9a7 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:12 +0100 Subject: [PATCH 71/77] Upgrade to Netty tcNative 2.0.48.Final Closes gh-29799 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index c587bcb46e21..f1a7ad119dd8 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1302,7 +1302,7 @@ bom { ] } } - library("Netty tcNative", "2.0.47.Final") { + library("Netty tcNative", "2.0.48.Final") { group("io.netty") { modules = [ "netty-tcnative", From 4a88b521a8b162daae867eeb759c40635beb94f1 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:13 +0100 Subject: [PATCH 72/77] Upgrade to Postgresql 42.3.2 Closes gh-29800 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index f1a7ad119dd8..ba60960edeb5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1345,7 +1345,7 @@ bom { ] } } - library("Postgresql", "42.3.1") { + library("Postgresql", "42.3.2") { group("org.postgresql") { modules = [ "postgresql" From 775ada2001a5ae1a779aa197871e3a681feaf45b Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:15 +0100 Subject: [PATCH 73/77] Upgrade to SLF4J 1.7.36 Closes gh-29801 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ba60960edeb5..9f98227ee557 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1576,7 +1576,7 @@ bom { ] } } - library("SLF4J", "1.7.33") { + library("SLF4J", "1.7.36") { group("org.slf4j") { modules = [ "jcl-over-slf4j", From 72fad9843a6cf9f3d648b69263682fb0385cdcbb Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:16 +0100 Subject: [PATCH 74/77] Upgrade to Thymeleaf 3.0.15.RELEASE Closes gh-29802 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 9f98227ee557..ad55284c63c4 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1750,7 +1750,7 @@ bom { ] } } - library("Thymeleaf", "3.0.14.RELEASE") { + library("Thymeleaf", "3.0.15.RELEASE") { group("org.thymeleaf") { modules = [ "thymeleaf", From 0abf0703c65f80913211ffe0e60aa41c34e1c1a2 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:16:18 +0100 Subject: [PATCH 75/77] Upgrade to Tomcat 9.0.58 Closes gh-29803 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 7857eb52e69e..84abb083634c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,6 @@ org.gradle.parallel=true org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8 kotlinVersion=1.6.10 -tomcatVersion=9.0.56 +tomcatVersion=9.0.58 kotlin.stdlib.default.dependency=false From f6a0fd5938d0268a2db256fdb1fedfcbdb7f998e Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 14 Feb 2022 13:18:06 +0100 Subject: [PATCH 76/77] Upgrade to Undertow 2.2.16.Final Closes gh-29804 --- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index ad55284c63c4..fd5599a2f0f4 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1813,7 +1813,7 @@ bom { ] } } - library("Undertow", "2.2.14.Final") { + library("Undertow", "2.2.16.Final") { group("io.undertow") { modules = [ "undertow-core", From 39394b9c2b3ca02140beffbf41091198109c7662 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sun, 13 Feb 2022 13:10:28 +0100 Subject: [PATCH 77/77] Link to Integration section of the appendix for Kafka properties See gh-29758 --- .../spring-boot-docs/src/docs/asciidoc/features/messaging.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc index 475617e1f847..7393b9d03f29 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/messaging.adoc @@ -411,7 +411,7 @@ You can customize this behavior using the configprop:spring.kafka.streams.auto-s [[features.messaging.kafka.additional-properties]] ==== Additional Kafka Properties -The properties supported by auto configuration are shown in <>. +The properties supported by auto configuration are shown in the <> section of the Appendix. Note that, for the most part, these properties (hyphenated or camelCase) map directly to the Apache Kafka dotted properties. Refer to the Apache Kafka documentation for details.