diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java index d06d7e1ca0c..763054dd48a 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java @@ -669,7 +669,7 @@ public class KafkaProperties { /** * Comma-delimited list of host:port pairs to use for establishing the initial - * connection to the Kafka cluster. Overrides the global property, for streams. + * connections to the Kafka cluster. Overrides the global property, for streams. */ private List bootstrapServers; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/ClientsConfiguredCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/ClientsConfiguredCondition.java index fac1ca580d1..1d9cdd80b60 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/ClientsConfiguredCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/ClientsConfiguredCondition.java @@ -41,7 +41,7 @@ public class ClientsConfiguredCondition extends SpringBootCondition { private static final Bindable> STRING_LOGIN_REGISTRATION_MAP = Bindable .mapOf(String.class, OAuth2ClientProperties.LoginClientRegistration.class); - private static final Bindable> STRING_AUTHORIZATIONCODE_REGISTRATION_MAP = Bindable + private static final Bindable> STRING_AUTHORIZATION_CODE_REGISTRATION_MAP = Bindable .mapOf(String.class, OAuth2ClientProperties.AuthorizationCodeClientRegistration.class); @@ -71,7 +71,7 @@ public class ClientsConfiguredCondition extends SpringBootCondition { Map authCodeClientRegistrations = Binder .get(environment) .bind("spring.security.oauth2.client.registration.authorizationcode", - STRING_AUTHORIZATIONCODE_REGISTRATION_MAP) + STRING_AUTHORIZATION_CODE_REGISTRATION_MAP) .orElse(Collections.emptyMap()); registrations.putAll(loginClientRegistrations); registrations.putAll(authCodeClientRegistrations); 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 1a4881334d9..f5262c3a316 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 @@ -307,7 +307,7 @@ public class KafkaAutoConfigurationTests { Properties configs = context.getBean( KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME, KafkaStreamsConfiguration.class).asProperties(); - assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)) + assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG)) .isEqualTo("localhost:9092, localhost:9093"); assertThat( configs.get(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG)) @@ -357,7 +357,7 @@ public class KafkaAutoConfigurationTests { Properties configs = context.getBean( KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME, KafkaStreamsConfiguration.class).asProperties(); - assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)) + assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG)) .isEqualTo("localhost:9092, localhost:9093"); assertThat(configs.get(StreamsConfig.APPLICATION_ID_CONFIG)) .isEqualTo("my-test-app"); @@ -376,7 +376,7 @@ public class KafkaAutoConfigurationTests { Properties configs = context.getBean( KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME, KafkaStreamsConfiguration.class).asProperties(); - assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG)) + assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG)) .isEqualTo("localhost:9094, localhost:9095"); assertThat(configs.get(StreamsConfig.APPLICATION_ID_CONFIG)) .isEqualTo("test-id"); @@ -628,7 +628,7 @@ public class KafkaAutoConfigurationTests { @Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME) public KafkaStreamsConfiguration kafkaStreamsConfiguration() { Map streamsProperties = new HashMap<>(); - streamsProperties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, + streamsProperties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9094, localhost:9095"); streamsProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, "test-id"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java index 79d6cd8a6c7..700f08019e3 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java @@ -236,7 +236,7 @@ public class OAuth2ClientPropertiesRegistrationAdapterTests { } @Test - public void getClientRegistrationsWhenAuhtorizationCodeClientShouldAdapt() { + public void getClientRegistrationsWhenAuthorizationCodeClientShouldAdapt() { OAuth2ClientProperties properties = new OAuth2ClientProperties(); OAuth2ClientProperties.AuthorizationCodeClientRegistration registration = new OAuth2ClientProperties.AuthorizationCodeClientRegistration(); registration.setClientId("clientId"); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java index 429d8ff3318..474727646c7 100755 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java @@ -26,7 +26,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; -import java.util.function.Supplier; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -96,25 +95,24 @@ public class BasicErrorControllerIntegrationTests { @Test public void testErrorForMachineClientTraceParamTrue() { - errorForMachineClientOnTraceParam(() -> createUrl("?trace=true"), true); + errorForMachineClientOnTraceParam("?trace=true", true); } @Test public void testErrorForMachineClientTraceParamFalse() { - errorForMachineClientOnTraceParam(() -> createUrl("?trace=false"), false); + errorForMachineClientOnTraceParam("?trace=false", false); } @Test public void testErrorForMachineClientTraceParamAbsent() { - errorForMachineClientOnTraceParam(() -> createUrl(""), false); + errorForMachineClientOnTraceParam("", false); } @SuppressWarnings("rawtypes") - private void errorForMachineClientOnTraceParam(Supplier url, - boolean expectedTrace) { + private void errorForMachineClientOnTraceParam(String path, boolean expectedTrace) { load("--server.error.include-exception=true", "--server.error.include-stacktrace=on-trace-param"); - ResponseEntity entity = new TestRestTemplate().getForEntity(url.get(), + ResponseEntity entity = new TestRestTemplate().getForEntity(createUrl(path), Map.class); assertErrorAttributes(entity.getBody(), "500", "Internal Server Error", IllegalStateException.class, "Expected!", "/"); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 5499c0761db..b24fb70352e 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -549,7 +549,7 @@ content into your application. Rather, pick only the properties that you need. spring.flyway.baseline-description= # spring.flyway.baseline-on-migrate= # spring.flyway.baseline-version=1 # Version to start migration - spring.flyway.batch = # + spring.flyway.batch= # spring.flyway.check-location=true # Whether to check that migration scripts location exists. spring.flyway.clean-disabled= # spring.flyway.clean-on-validation-error= # @@ -1106,9 +1106,9 @@ content into your application. Rather, pick only the properties that you need. spring.kafka.ssl.trust-store-location= # Location of the trust store file. spring.kafka.ssl.trust-store-password= # Store password for the trust store file. spring.kafka.ssl.trust-store-type= # Type of the trust store. - spring.kafka.streams.application-id = # Kafka streams application.id property; default spring.application.name. + spring.kafka.streams.application-id= # Kafka streams application.id property; default spring.application.name. spring.kafka.streams.auto-startup=true # Whether or not to auto-start the streams factory bean. - spring.kafka.streams.bootstrap-servers= # Comma-delimited list of host:port pairs to use for establishing the initial connection to the Kafka cluster. Overrides the global property, for streams. + spring.kafka.streams.bootstrap-servers= # Comma-delimited list of host:port pairs to use for establishing the initial connections to the Kafka cluster. Overrides the global property, for streams. spring.kafka.streams.cache-max-bytes-buffering= # Maximum number of memory bytes to be used for buffering across all threads. spring.kafka.streams.client-id= # ID to pass to the server when making requests. Used for server-side logging. spring.kafka.streams.properties.*= # Additional Kafka properties used to configure the streams. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index e1322a02308..aa2da58b05a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1326,7 +1326,7 @@ source for more details. [[howto-switch-off-the-spring-mvc-dispatcherservlet]] === Switch Off the Spring MVC DispatcherServlet -By default, All content is served from the root of your application (`/`) down. If you +By default, all content is served from the root of your application (`/`). If you would rather map to a different path, you can configure one as follows: [source,properties,indent=0,subs="verbatim"] @@ -1334,7 +1334,7 @@ would rather map to a different path, you can configure one as follows: spring.mvc.servlet.path=/acme ---- -If you have additional servlets you can declare a `@Bean` of type `Servlet` or +If you have additional servlets you can declare a `@Bean` of type `Servlet` or `ServletRegistrationBean` for each and Spring Boot will register them transparently to the container. Because servlets are registered that way, they can be mapped to a sub-context of the `DispatcherServlet` without invoking it. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 4c6c1b2ca06..097b25fdd4a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -5701,12 +5701,12 @@ reference the auto-configured `KafkaTransactionManager` bean. ==== Kafka Streams Spring for Apache Kafka provides a factory bean to create a `StreamsBuilder` object and manage the lifecycle of its streams. Spring Boot auto-configures the required -`KafkaStreamsConfiguration` bean as long as `kafka-streams` in on the classpath and kafka -streams is enabled via the `@EnableKafkaStreams` annotation. +`KafkaStreamsConfiguration` bean as long as `kafka-streams` is on the classpath and Kafka +Streams is enabled via the `@EnableKafkaStreams` annotation. Enabling Kafka Streams means that the application id and bootstrap servers must be set. The former can be configured using `spring.kafka.streams.application-id`, defaulting to -`spring.application.name` if not set. The later can be set globally or +`spring.application.name` if not set. The latter can be set globally or specifically overridden just for streams. Several additional properties are available using dedicated properties; other arbitrary