Skip to content

Commit d510bc7

Browse files
izeyesnicoll
authored andcommitted
Polish
Closes gh-14271
1 parent 7dff13b commit d510bc7

File tree

8 files changed

+21
-23
lines changed

8 files changed

+21
-23
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ public static class Streams {
669669

670670
/**
671671
* Comma-delimited list of host:port pairs to use for establishing the initial
672-
* connection to the Kafka cluster. Overrides the global property, for streams.
672+
* connections to the Kafka cluster. Overrides the global property, for streams.
673673
*/
674674
private List<String> bootstrapServers;
675675

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/ClientsConfiguredCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class ClientsConfiguredCondition extends SpringBootCondition {
4141
private static final Bindable<Map<String, OAuth2ClientProperties.LoginClientRegistration>> STRING_LOGIN_REGISTRATION_MAP = Bindable
4242
.mapOf(String.class, OAuth2ClientProperties.LoginClientRegistration.class);
4343

44-
private static final Bindable<Map<String, OAuth2ClientProperties.AuthorizationCodeClientRegistration>> STRING_AUTHORIZATIONCODE_REGISTRATION_MAP = Bindable
44+
private static final Bindable<Map<String, OAuth2ClientProperties.AuthorizationCodeClientRegistration>> STRING_AUTHORIZATION_CODE_REGISTRATION_MAP = Bindable
4545
.mapOf(String.class,
4646
OAuth2ClientProperties.AuthorizationCodeClientRegistration.class);
4747

@@ -71,7 +71,7 @@ private Map<String, OAuth2ClientProperties.BaseClientRegistration> getRegistrati
7171
Map<String, OAuth2ClientProperties.AuthorizationCodeClientRegistration> authCodeClientRegistrations = Binder
7272
.get(environment)
7373
.bind("spring.security.oauth2.client.registration.authorizationcode",
74-
STRING_AUTHORIZATIONCODE_REGISTRATION_MAP)
74+
STRING_AUTHORIZATION_CODE_REGISTRATION_MAP)
7575
.orElse(Collections.emptyMap());
7676
registrations.putAll(loginClientRegistrations);
7777
registrations.putAll(authCodeClientRegistrations);

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public void streamsProperties() {
307307
Properties configs = context.getBean(
308308
KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME,
309309
KafkaStreamsConfiguration.class).asProperties();
310-
assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG))
310+
assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG))
311311
.isEqualTo("localhost:9092, localhost:9093");
312312
assertThat(
313313
configs.get(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG))
@@ -357,7 +357,7 @@ public void streamsApplicationIdUsesMainApplicationNameByDefault() {
357357
Properties configs = context.getBean(
358358
KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME,
359359
KafkaStreamsConfiguration.class).asProperties();
360-
assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG))
360+
assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG))
361361
.isEqualTo("localhost:9092, localhost:9093");
362362
assertThat(configs.get(StreamsConfig.APPLICATION_ID_CONFIG))
363363
.isEqualTo("my-test-app");
@@ -376,7 +376,7 @@ public void streamsWithCustomKafkaConfiguration() {
376376
Properties configs = context.getBean(
377377
KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME,
378378
KafkaStreamsConfiguration.class).asProperties();
379-
assertThat(configs.get(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG))
379+
assertThat(configs.get(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG))
380380
.isEqualTo("localhost:9094, localhost:9095");
381381
assertThat(configs.get(StreamsConfig.APPLICATION_ID_CONFIG))
382382
.isEqualTo("test-id");
@@ -628,7 +628,7 @@ protected static class TestKafkaStreamsConfiguration {
628628
@Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME)
629629
public KafkaStreamsConfiguration kafkaStreamsConfiguration() {
630630
Map<String, Object> streamsProperties = new HashMap<>();
631-
streamsProperties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
631+
streamsProperties.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG,
632632
"localhost:9094, localhost:9095");
633633
streamsProperties.put(StreamsConfig.APPLICATION_ID_CONFIG, "test-id");
634634

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public void getClientRegistrationsWhenProviderNotSpecifiedShouldUseRegistrationI
236236
}
237237

238238
@Test
239-
public void getClientRegistrationsWhenAuhtorizationCodeClientShouldAdapt() {
239+
public void getClientRegistrationsWhenAuthorizationCodeClientShouldAdapt() {
240240
OAuth2ClientProperties properties = new OAuth2ClientProperties();
241241
OAuth2ClientProperties.AuthorizationCodeClientRegistration registration = new OAuth2ClientProperties.AuthorizationCodeClientRegistration();
242242
registration.setClientId("clientId");

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorControllerIntegrationTests.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.Arrays;
2727
import java.util.List;
2828
import java.util.Map;
29-
import java.util.function.Supplier;
3029

3130
import javax.servlet.http.HttpServletRequest;
3231
import javax.servlet.http.HttpServletResponse;
@@ -96,25 +95,24 @@ public void testErrorForMachineClient() {
9695

9796
@Test
9897
public void testErrorForMachineClientTraceParamTrue() {
99-
errorForMachineClientOnTraceParam(() -> createUrl("?trace=true"), true);
98+
errorForMachineClientOnTraceParam("?trace=true", true);
10099
}
101100

102101
@Test
103102
public void testErrorForMachineClientTraceParamFalse() {
104-
errorForMachineClientOnTraceParam(() -> createUrl("?trace=false"), false);
103+
errorForMachineClientOnTraceParam("?trace=false", false);
105104
}
106105

107106
@Test
108107
public void testErrorForMachineClientTraceParamAbsent() {
109-
errorForMachineClientOnTraceParam(() -> createUrl(""), false);
108+
errorForMachineClientOnTraceParam("", false);
110109
}
111110

112111
@SuppressWarnings("rawtypes")
113-
private void errorForMachineClientOnTraceParam(Supplier<String> url,
114-
boolean expectedTrace) {
112+
private void errorForMachineClientOnTraceParam(String path, boolean expectedTrace) {
115113
load("--server.error.include-exception=true",
116114
"--server.error.include-stacktrace=on-trace-param");
117-
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(url.get(),
115+
ResponseEntity<Map> entity = new TestRestTemplate().getForEntity(createUrl(path),
118116
Map.class);
119117
assertErrorAttributes(entity.getBody(), "500", "Internal Server Error",
120118
IllegalStateException.class, "Expected!", "/");

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ content into your application. Rather, pick only the properties that you need.
549549
spring.flyway.baseline-description= #
550550
spring.flyway.baseline-on-migrate= #
551551
spring.flyway.baseline-version=1 # Version to start migration
552-
spring.flyway.batch = #
552+
spring.flyway.batch= #
553553
spring.flyway.check-location=true # Whether to check that migration scripts location exists.
554554
spring.flyway.clean-disabled= #
555555
spring.flyway.clean-on-validation-error= #
@@ -1106,9 +1106,9 @@ content into your application. Rather, pick only the properties that you need.
11061106
spring.kafka.ssl.trust-store-location= # Location of the trust store file.
11071107
spring.kafka.ssl.trust-store-password= # Store password for the trust store file.
11081108
spring.kafka.ssl.trust-store-type= # Type of the trust store.
1109-
spring.kafka.streams.application-id = # Kafka streams application.id property; default spring.application.name.
1109+
spring.kafka.streams.application-id= # Kafka streams application.id property; default spring.application.name.
11101110
spring.kafka.streams.auto-startup=true # Whether or not to auto-start the streams factory bean.
1111-
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.
1111+
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.
11121112
spring.kafka.streams.cache-max-bytes-buffering= # Maximum number of memory bytes to be used for buffering across all threads.
11131113
spring.kafka.streams.client-id= # ID to pass to the server when making requests. Used for server-side logging.
11141114
spring.kafka.streams.properties.*= # Additional Kafka properties used to configure the streams.

spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,15 +1326,15 @@ source for more details.
13261326

13271327
[[howto-switch-off-the-spring-mvc-dispatcherservlet]]
13281328
=== Switch Off the Spring MVC DispatcherServlet
1329-
By default, All content is served from the root of your application (`/`) down. If you
1329+
By default, all content is served from the root of your application (`/`). If you
13301330
would rather map to a different path, you can configure one as follows:
13311331

13321332
[source,properties,indent=0,subs="verbatim"]
13331333
----
13341334
spring.mvc.servlet.path=/acme
13351335
----
13361336

1337-
If you have additional servlets you can declare a `@Bean` of type `Servlet` or
1337+
If you have additional servlets you can declare a `@Bean` of type `Servlet` or
13381338
`ServletRegistrationBean` for each and Spring Boot will register them transparently to the
13391339
container. Because servlets are registered that way, they can be mapped to a sub-context
13401340
of the `DispatcherServlet` without invoking it.

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5701,12 +5701,12 @@ reference the auto-configured `KafkaTransactionManager` bean.
57015701
==== Kafka Streams
57025702
Spring for Apache Kafka provides a factory bean to create a `StreamsBuilder` object and
57035703
manage the lifecycle of its streams. Spring Boot auto-configures the required
5704-
`KafkaStreamsConfiguration` bean as long as `kafka-streams` in on the classpath and kafka
5705-
streams is enabled via the `@EnableKafkaStreams` annotation.
5704+
`KafkaStreamsConfiguration` bean as long as `kafka-streams` is on the classpath and Kafka
5705+
Streams is enabled via the `@EnableKafkaStreams` annotation.
57065706

57075707
Enabling Kafka Streams means that the application id and bootstrap servers must be set.
57085708
The former can be configured using `spring.kafka.streams.application-id`, defaulting to
5709-
`spring.application.name` if not set. The later can be set globally or
5709+
`spring.application.name` if not set. The latter can be set globally or
57105710
specifically overridden just for streams.
57115711

57125712
Several additional properties are available using dedicated properties; other arbitrary

0 commit comments

Comments
 (0)