Skip to content

Commit ba50179

Browse files
committed
Consistent use of WebFlux terminology over Web Reactive
1 parent 429d6ac commit ba50179

File tree

7 files changed

+28
-30
lines changed

7 files changed

+28
-30
lines changed

spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.ui;
1718

1819
import java.util.Collection;
@@ -23,12 +24,13 @@
2324
import org.springframework.util.Assert;
2425

2526
/**
26-
* Implementation of {@link Model} based on a {@link ConcurrentHashMap} for use
27-
* in concurrent scenarios. Exposed to handler methods by Spring Web Reactive
28-
* typically via a declaration of the {@link Model} interface. There is typically
29-
* no need to create it within user code. If necessary a controller method can
30-
* return a regular {@code java.util.Map}, or more likely a
31-
* {@code java.util.ConcurrentMap}.
27+
* Implementation of the {@link Model} interface based on a {@link ConcurrentHashMap}
28+
* for use in concurrent scenarios.
29+
*
30+
* <p>Exposed to handler methods by Spring WebFlux, typically via a declaration of the
31+
* {@link Model} interface. There is typically no need to create it within user code.
32+
* If necessary a handler method can return a regular {@code java.util.Map},
33+
* likely a {@code java.util.ConcurrentMap}, for a pre-determined model.
3234
*
3335
* @author Rossen Stoyanchev
3436
* @since 5.0

spring-context/src/main/java/org/springframework/validation/support/BindingAwareConcurrentModel.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,16 +22,16 @@
2222
import org.springframework.validation.BindingResult;
2323

2424
/**
25-
* Sub-class of {@link ConcurrentModel} that automatically removes
25+
* Subclass of {@link ConcurrentModel} that automatically removes
2626
* the {@link BindingResult} object when its corresponding
2727
* target attribute is replaced through regular {@link Map} operations.
2828
*
29-
* <p>This is the class exposed to controller methods by Spring Web Reactive,
29+
* <p>This is the class exposed to handler methods by Spring WebFlux,
3030
* typically consumed through a declaration of the
31-
* {@link org.springframework.ui.Model} interface. There is typically
32-
* no need to create it within user code. If necessary a controller method can
33-
* return a regular {@code java.util.Map}, or more likely a
34-
* {@code java.util.ConcurrentMap}.
31+
* {@link org.springframework.ui.Model} interface as a parameter type.
32+
* There is typically no need to create it within user code.
33+
* If necessary a handler method can return a regular {@code java.util.Map},
34+
* likely a {@code java.util.ConcurrentMap}, for a pre-determined model.
3535
*
3636
* @author Rossen Stoyanchev
3737
* @since 5.0

spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@
3333
* &#064;EnableWebFlux
3434
* &#064;ComponentScan(basePackageClasses = MyConfiguration.class)
3535
* public class MyConfiguration {
36-
*
3736
* }
3837
* </pre>
3938
*
@@ -55,15 +54,13 @@
5554
* public void configureMessageWriters(List&lt;HttpMessageWriter&lt;?&gt&gt messageWriters) {
5655
* messageWriters.add(new MyHttpMessageWriter());
5756
* }
58-
*
5957
* }
6058
* </pre>
6159
*
6260
* <p><strong>Note:</strong> only one {@code @Configuration} class may have the
63-
* {@code @EnableWebFlux} annotation to import the Spring Web Reactive
64-
* configuration. There can however be multiple {@code @Configuration} classes
65-
* implementing {@code WebFluxConfigurer} in order to customize the provided
66-
* configuration.
61+
* {@code @EnableWebFlux} annotation to import the Spring WebFlux configuration.
62+
* There can however be multiple {@code @Configuration} classes implementing
63+
* {@code WebFluxConfigurer} in order to customize the provided configuration.
6764
*
6865
* <p>If {@link WebFluxConfigurer} does not expose some more advanced setting
6966
* that needs to be configured consider removing the {@code @EnableWebFlux}

spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
import org.springframework.web.server.handler.ResponseStatusExceptionHandler;
6262

6363
/**
64-
* The main class for Spring Web Reactive configuration.
64+
* The main class for Spring WebFlux configuration.
6565
*
6666
* <p>Import directly or extend and override protected methods to customize.
6767
*
@@ -73,8 +73,8 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
7373
static final boolean jackson2Present =
7474
ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper",
7575
WebFluxConfigurationSupport.class.getClassLoader()) &&
76-
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator",
77-
WebFluxConfigurationSupport.class.getClassLoader());
76+
ClassUtils.isPresent("com.fasterxml.jackson.core.JsonGenerator",
77+
WebFluxConfigurationSupport.class.getClassLoader());
7878

7979

8080
private Map<String, CorsConfiguration> corsConfigurations;
@@ -408,6 +408,7 @@ public Mono<Object> getHandlerInternal(ServerWebExchange exchange) {
408408
}
409409
}
410410

411+
411412
private static final class NoOpValidator implements Validator {
412413

413414
@Override

spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.web.reactive.config;
1818

19-
import java.util.List;
2019
import java.util.Optional;
2120

2221
import org.springframework.core.convert.converter.Converter;
@@ -28,11 +27,10 @@
2827
import org.springframework.web.reactive.accept.CompositeContentTypeResolver;
2928
import org.springframework.web.reactive.accept.RequestedContentTypeResolver;
3029
import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder;
31-
import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver;
3230
import org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer;
3331

3432
/**
35-
* Defines callback methods to customize the configuration for Web Reactive
33+
* Defines callback methods to customize the configuration for WebFlux
3634
* applications enabled via {@code @EnableWebFlux}.
3735
*
3836
* <p>{@code @EnableWebFlux}-annotated configuration classes may implement
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/**
2-
* Defines Spring Web Reactive configuration.
2+
* Spring WebFlux configuration infrastructure.
33
*/
44
package org.springframework.web.reactive.config;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/**
2-
* Support classes for Spring Web Reactive.
2+
* Support classes for Spring WebFlux setup.
33
*/
44
package org.springframework.web.reactive.support;

0 commit comments

Comments
 (0)