Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sesemomo
spring-framework
提交
48807be4
S
spring-framework
项目概览
sesemomo
/
spring-framework
与 Fork 源项目一致
从无法访问的项目Fork
通知
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,发现更多精彩内容 >>
提交
48807be4
编写于
5月 05, 2018
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
c9f48836
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
33 deletion
+21
-33
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java
...web/reactive/function/client/DefaultWebClientBuilder.java
+8
-9
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeStrategies.java
...work/web/reactive/function/client/ExchangeStrategies.java
+1
-5
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java
...ringframework/web/reactive/function/client/WebClient.java
+10
-10
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/HandlerStrategies.java
...ework/web/reactive/function/server/HandlerStrategies.java
+1
-5
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java
...ramework/web/reactive/function/server/ServerResponse.java
+1
-4
未找到文件。
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java
浏览文件 @
48807be4
...
...
@@ -63,11 +63,11 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
@Nullable
private
ClientHttpConnector
connector
;
private
ExchangeStrategies
exchangeStrategies
;
@Nullable
private
ExchangeFunction
exchangeFunction
;
private
ExchangeStrategies
exchangeStrategies
;
public
DefaultWebClientBuilder
()
{
this
.
exchangeStrategies
=
ExchangeStrategies
.
withDefaults
();
...
...
@@ -91,8 +91,8 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
new
LinkedMultiValueMap
<>(
other
.
defaultCookies
)
:
null
);
this
.
filters
=
(
other
.
filters
!=
null
?
new
ArrayList
<>(
other
.
filters
)
:
null
);
this
.
connector
=
other
.
connector
;
this
.
exchangeStrategies
=
other
.
exchangeStrategies
;
this
.
exchangeFunction
=
other
.
exchangeFunction
;
this
.
exchangeStrategies
=
other
.
exchangeStrategies
;
}
...
...
@@ -182,15 +182,15 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
}
@Override
public
WebClient
.
Builder
exchangeStrategies
(
ExchangeStrategies
strategies
)
{
Assert
.
notNull
(
strategies
,
"ExchangeStrategies must not be null"
);
this
.
exchangeStrategies
=
strategies
;
public
WebClient
.
Builder
exchangeFunction
(
ExchangeFunction
exchangeFunction
)
{
this
.
exchangeFunction
=
exchangeFunction
;
return
this
;
}
@Override
public
WebClient
.
Builder
exchangeFunction
(
ExchangeFunction
exchangeFunction
)
{
this
.
exchangeFunction
=
exchangeFunction
;
public
WebClient
.
Builder
exchangeStrategies
(
ExchangeStrategies
strategies
)
{
Assert
.
notNull
(
strategies
,
"ExchangeStrategies must not be null"
);
this
.
exchangeStrategies
=
strategies
;
return
this
;
}
...
...
@@ -242,7 +242,6 @@ final class DefaultWebClientBuilder implements WebClient.Builder {
else
if
(
this
.
connector
!=
null
)
{
return
ExchangeFunctions
.
create
(
this
.
connector
,
this
.
exchangeStrategies
);
}
else
{
return
ExchangeFunctions
.
create
(
new
ReactorClientHttpConnector
(),
this
.
exchangeStrategies
);
}
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeStrategies.java
浏览文件 @
48807be4
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -35,8 +35,6 @@ import org.springframework.http.codec.HttpMessageWriter;
*/
public
interface
ExchangeStrategies
{
// Instance methods
/**
* Return the {@link HttpMessageReader}s to be used for request body conversion.
* @return the stream of message readers
...
...
@@ -60,8 +58,6 @@ public interface ExchangeStrategies {
return
builder
().
build
();
}
// Builder methods
/**
* Return a mutable builder for a {@code ExchangeStrategies} with default initialization.
* @return the builder
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java
浏览文件 @
48807be4
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -285,15 +285,6 @@ public interface WebClient {
*/
Builder
filters
(
Consumer
<
List
<
ExchangeFilterFunction
>>
filtersConsumer
);
/**
* Configure the {@link ExchangeStrategies} to use.
* <p>By default {@link ExchangeStrategies#withDefaults()} is used.
* @param strategies the strategies to use
* @see #clientConnector(ClientHttpConnector)
* @see #exchangeFunction(ExchangeFunction)
*/
Builder
exchangeStrategies
(
ExchangeStrategies
strategies
);
/**
* Provide a pre-configured {@link ExchangeFunction} instance. This is
* an alternative to and effectively overrides the following:
...
...
@@ -307,6 +298,15 @@ public interface WebClient {
*/
Builder
exchangeFunction
(
ExchangeFunction
exchangeFunction
);
/**
* Configure the {@link ExchangeStrategies} to use.
* <p>By default {@link ExchangeStrategies#withDefaults()} is used.
* @param strategies the strategies to use
* @see #clientConnector(ClientHttpConnector)
* @see #exchangeFunction(ExchangeFunction)
*/
Builder
exchangeStrategies
(
ExchangeStrategies
strategies
);
/**
* Clone this {@code WebClient.Builder}
*/
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/HandlerStrategies.java
浏览文件 @
48807be4
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
8
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.
...
...
@@ -41,8 +41,6 @@ import org.springframework.web.server.i18n.LocaleContextResolver;
*/
public
interface
HandlerStrategies
{
// Instance methods
/**
* Return the {@link HttpMessageReader}s to be used for request body conversion.
* @return the message readers
...
...
@@ -90,8 +88,6 @@ public interface HandlerStrategies {
return
builder
().
build
();
}
// Builder methods
/**
* Return a mutable builder for a {@code HandlerStrategies} with default initialization.
* @return the builder
...
...
spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java
浏览文件 @
48807be4
...
...
@@ -56,8 +56,6 @@ import org.springframework.web.server.ServerWebExchange;
*/
public
interface
ServerResponse
{
// Instance methods
/**
* Return the status code of this response.
*/
...
...
@@ -82,7 +80,7 @@ public interface ServerResponse {
Mono
<
Void
>
writeTo
(
ServerWebExchange
exchange
,
Context
context
);
// Static
builder
methods
// Static methods
/**
* Create a builder with the status code and headers of the given response.
...
...
@@ -190,7 +188,6 @@ public interface ServerResponse {
/**
* Create a builder with a {@linkplain HttpStatus#NOT_FOUND 404 Not Found} status.
*
* @return the created builder
*/
static
HeadersBuilder
<?>
notFound
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录