Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
ba501791
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba501791
编写于
5月 05, 2017
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Consistent use of WebFlux terminology over Web Reactive
上级
429d6ac6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
30 deletion
+28
-30
spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java
...src/main/java/org/springframework/ui/ConcurrentModel.java
+9
-7
spring-context/src/main/java/org/springframework/validation/support/BindingAwareConcurrentModel.java
...ework/validation/support/BindingAwareConcurrentModel.java
+7
-7
spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java
...rg/springframework/web/reactive/config/EnableWebFlux.java
+4
-7
spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java
...work/web/reactive/config/WebFluxConfigurationSupport.java
+4
-3
spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java
...pringframework/web/reactive/config/WebFluxConfigurer.java
+2
-4
spring-webflux/src/main/java/org/springframework/web/reactive/config/package-info.java
...org/springframework/web/reactive/config/package-info.java
+1
-1
spring-webflux/src/main/java/org/springframework/web/reactive/support/package-info.java
...rg/springframework/web/reactive/support/package-info.java
+1
-1
未找到文件。
spring-context/src/main/java/org/springframework/ui/ConcurrentModel.java
浏览文件 @
ba501791
/*
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
org.springframework.ui
;
package
org.springframework.ui
;
import
java.util.Collection
;
import
java.util.Collection
;
...
@@ -23,12 +24,13 @@ import org.springframework.core.Conventions;
...
@@ -23,12 +24,13 @@ import org.springframework.core.Conventions;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
/**
/**
* Implementation of {@link Model} based on a {@link ConcurrentHashMap} for use
* Implementation of the {@link Model} interface based on a {@link ConcurrentHashMap}
* in concurrent scenarios. Exposed to handler methods by Spring Web Reactive
* for use in concurrent scenarios.
* typically via a declaration of the {@link Model} interface. There is typically
*
* no need to create it within user code. If necessary a controller method can
* <p>Exposed to handler methods by Spring WebFlux, typically via a declaration of the
* return a regular {@code java.util.Map}, or more likely a
* {@link Model} interface. There is typically no need to create it within user code.
* {@code java.util.ConcurrentMap}.
* If necessary a handler method can return a regular {@code java.util.Map},
* likely a {@code java.util.ConcurrentMap}, for a pre-determined model.
*
*
* @author Rossen Stoyanchev
* @author Rossen Stoyanchev
* @since 5.0
* @since 5.0
...
...
spring-context/src/main/java/org/springframework/validation/support/BindingAwareConcurrentModel.java
浏览文件 @
ba501791
/*
/*
* Copyright 2002-201
5
the original author or authors.
* Copyright 2002-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -22,16 +22,16 @@ import org.springframework.ui.ConcurrentModel;
...
@@ -22,16 +22,16 @@ import org.springframework.ui.ConcurrentModel;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.BindingResult
;
/**
/**
* Sub
-
class of {@link ConcurrentModel} that automatically removes
* Subclass of {@link ConcurrentModel} that automatically removes
* the {@link BindingResult} object when its corresponding
* the {@link BindingResult} object when its corresponding
* target attribute is replaced through regular {@link Map} operations.
* target attribute is replaced through regular {@link Map} operations.
*
*
* <p>This is the class exposed to
controller methods by Spring Web Reactive
,
* <p>This is the class exposed to
handler methods by Spring WebFlux
,
* typically consumed through a declaration of the
* typically consumed through a declaration of the
* {@link org.springframework.ui.Model} interface
. There is typically
* {@link org.springframework.ui.Model} interface
as a parameter type.
*
no need to create it within user code. If necessary a controller method can
*
There is typically no need to create it within user code.
*
return a regular {@code java.util.Map}, or more likely a
*
If necessary a handler method can return a regular {@code java.util.Map},
*
{@code java.util.ConcurrentMap}
.
*
likely a {@code java.util.ConcurrentMap}, for a pre-determined model
.
*
*
* @author Rossen Stoyanchev
* @author Rossen Stoyanchev
* @since 5.0
* @since 5.0
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/config/EnableWebFlux.java
浏览文件 @
ba501791
/*
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -33,7 +33,6 @@ import org.springframework.context.annotation.Import;
...
@@ -33,7 +33,6 @@ import org.springframework.context.annotation.Import;
* @EnableWebFlux
* @EnableWebFlux
* @ComponentScan(basePackageClasses = MyConfiguration.class)
* @ComponentScan(basePackageClasses = MyConfiguration.class)
* public class MyConfiguration {
* public class MyConfiguration {
*
* }
* }
* </pre>
* </pre>
*
*
...
@@ -55,15 +54,13 @@ import org.springframework.context.annotation.Import;
...
@@ -55,15 +54,13 @@ import org.springframework.context.annotation.Import;
* public void configureMessageWriters(List<HttpMessageWriter<?>> messageWriters) {
* public void configureMessageWriters(List<HttpMessageWriter<?>> messageWriters) {
* messageWriters.add(new MyHttpMessageWriter());
* messageWriters.add(new MyHttpMessageWriter());
* }
* }
*
* }
* }
* </pre>
* </pre>
*
*
* <p><strong>Note:</strong> only one {@code @Configuration} class may have the
* <p><strong>Note:</strong> only one {@code @Configuration} class may have the
* {@code @EnableWebFlux} annotation to import the Spring Web Reactive
* {@code @EnableWebFlux} annotation to import the Spring WebFlux configuration.
* configuration. There can however be multiple {@code @Configuration} classes
* There can however be multiple {@code @Configuration} classes implementing
* implementing {@code WebFluxConfigurer} in order to customize the provided
* {@code WebFluxConfigurer} in order to customize the provided configuration.
* configuration.
*
*
* <p>If {@link WebFluxConfigurer} does not expose some more advanced setting
* <p>If {@link WebFluxConfigurer} does not expose some more advanced setting
* that needs to be configured consider removing the {@code @EnableWebFlux}
* that needs to be configured consider removing the {@code @EnableWebFlux}
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurationSupport.java
浏览文件 @
ba501791
...
@@ -61,7 +61,7 @@ import org.springframework.web.server.WebExceptionHandler;
...
@@ -61,7 +61,7 @@ import org.springframework.web.server.WebExceptionHandler;
import
org.springframework.web.server.handler.ResponseStatusExceptionHandler
;
import
org.springframework.web.server.handler.ResponseStatusExceptionHandler
;
/**
/**
* The main class for Spring Web
Reactive
configuration.
* The main class for Spring Web
Flux
configuration.
*
*
* <p>Import directly or extend and override protected methods to customize.
* <p>Import directly or extend and override protected methods to customize.
*
*
...
@@ -73,8 +73,8 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
...
@@ -73,8 +73,8 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
static
final
boolean
jackson2Present
=
static
final
boolean
jackson2Present
=
ClassUtils
.
isPresent
(
"com.fasterxml.jackson.databind.ObjectMapper"
,
ClassUtils
.
isPresent
(
"com.fasterxml.jackson.databind.ObjectMapper"
,
WebFluxConfigurationSupport
.
class
.
getClassLoader
())
&&
WebFluxConfigurationSupport
.
class
.
getClassLoader
())
&&
ClassUtils
.
isPresent
(
"com.fasterxml.jackson.core.JsonGenerator"
,
ClassUtils
.
isPresent
(
"com.fasterxml.jackson.core.JsonGenerator"
,
WebFluxConfigurationSupport
.
class
.
getClassLoader
());
WebFluxConfigurationSupport
.
class
.
getClassLoader
());
private
Map
<
String
,
CorsConfiguration
>
corsConfigurations
;
private
Map
<
String
,
CorsConfiguration
>
corsConfigurations
;
...
@@ -408,6 +408,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
...
@@ -408,6 +408,7 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
}
}
}
}
private
static
final
class
NoOpValidator
implements
Validator
{
private
static
final
class
NoOpValidator
implements
Validator
{
@Override
@Override
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/config/WebFluxConfigurer.java
浏览文件 @
ba501791
/*
/*
* Copyright 2002-201
6
the original author or authors.
* Copyright 2002-201
7
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
package
org.springframework.web.reactive.config
;
package
org.springframework.web.reactive.config
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Optional
;
import
org.springframework.core.convert.converter.Converter
;
import
org.springframework.core.convert.converter.Converter
;
...
@@ -28,11 +27,10 @@ import org.springframework.validation.Validator;
...
@@ -28,11 +27,10 @@ import org.springframework.validation.Validator;
import
org.springframework.web.reactive.accept.CompositeContentTypeResolver
;
import
org.springframework.web.reactive.accept.CompositeContentTypeResolver
;
import
org.springframework.web.reactive.accept.RequestedContentTypeResolver
;
import
org.springframework.web.reactive.accept.RequestedContentTypeResolver
;
import
org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder
;
import
org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder
;
import
org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver
;
import
org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer
;
import
org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer
;
/**
/**
* Defines callback methods to customize the configuration for Web
Reactive
* Defines callback methods to customize the configuration for Web
Flux
* applications enabled via {@code @EnableWebFlux}.
* applications enabled via {@code @EnableWebFlux}.
*
*
* <p>{@code @EnableWebFlux}-annotated configuration classes may implement
* <p>{@code @EnableWebFlux}-annotated configuration classes may implement
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/config/package-info.java
浏览文件 @
ba501791
/**
/**
*
Defines Spring Web Reactive configuration
.
*
Spring WebFlux configuration infrastructure
.
*/
*/
package
org.springframework.web.reactive.config
;
package
org.springframework.web.reactive.config
;
spring-webflux/src/main/java/org/springframework/web/reactive/support/package-info.java
浏览文件 @
ba501791
/**
/**
* Support classes for Spring Web
Reactive
.
* Support classes for Spring Web
Flux setup
.
*/
*/
package
org.springframework.web.reactive.support
;
package
org.springframework.web.reactive.support
;
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录