Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
58431735
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,发现更多精彩内容 >>
提交
58431735
编写于
11月 21, 2017
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
08c95fbc
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
35 addition
and
46 deletion
+35
-46
spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
...ramework/context/annotation/ConfigurationClassParser.java
+1
-5
spring-core/src/main/java/org/springframework/core/ReactiveAdapterRegistry.java
...ava/org/springframework/core/ReactiveAdapterRegistry.java
+25
-26
spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java
...mework/core/convert/support/DefaultConversionService.java
+9
-15
未找到文件。
spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java
浏览文件 @
58431735
...
@@ -231,11 +231,7 @@ class ConfigurationClassParser {
...
@@ -231,11 +231,7 @@ class ConfigurationClassParser {
// Explicit bean definition found, probably replacing an import.
// Explicit bean definition found, probably replacing an import.
// Let's remove the old one and go with the new one.
// Let's remove the old one and go with the new one.
this
.
configurationClasses
.
remove
(
configClass
);
this
.
configurationClasses
.
remove
(
configClass
);
for
(
Iterator
<
ConfigurationClass
>
it
=
this
.
knownSuperclasses
.
values
().
iterator
();
it
.
hasNext
();)
{
this
.
knownSuperclasses
.
values
().
removeIf
(
configClass:
:
equals
);
if
(
configClass
.
equals
(
it
.
next
()))
{
it
.
remove
();
}
}
}
}
}
}
...
...
spring-core/src/main/java/org/springframework/core/ReactiveAdapterRegistry.java
浏览文件 @
58431735
...
@@ -104,31 +104,6 @@ public class ReactiveAdapterRegistry {
...
@@ -104,31 +104,6 @@ public class ReactiveAdapterRegistry {
}
}
/**
* Return a shared default {@code ReactiveAdapterRegistry} instance, lazily
* building it once needed.
* <p><b>NOTE:</b> We highly recommend passing a long-lived, pre-configured
* {@code ReactiveAdapterRegistry} instance for customization purposes.
* This accessor is only meant as a fallback for code paths that want to
* fall back on a default instance if one isn't provided.
* @return the shared {@code ReactiveAdapterRegistry} instance (never {@code null})
* @since 5.0.2
*/
public
static
ReactiveAdapterRegistry
getSharedInstance
()
{
ReactiveAdapterRegistry
ar
=
sharedInstance
;
if
(
ar
==
null
)
{
synchronized
(
ReactiveAdapterRegistry
.
class
)
{
ar
=
sharedInstance
;
if
(
ar
==
null
)
{
ar
=
new
ReactiveAdapterRegistry
();
sharedInstance
=
ar
;
}
}
}
return
ar
;
}
/**
/**
* Whether the registry has any adapters which would be the case if any of
* Whether the registry has any adapters which would be the case if any of
* Reactor, RxJava 2, or RxJava 1 (+ RxJava Reactive Streams bridge) are
* Reactor, RxJava 2, or RxJava 1 (+ RxJava Reactive Streams bridge) are
...
@@ -138,7 +113,6 @@ public class ReactiveAdapterRegistry {
...
@@ -138,7 +113,6 @@ public class ReactiveAdapterRegistry {
return
!
this
.
adapters
.
isEmpty
();
return
!
this
.
adapters
.
isEmpty
();
}
}
/**
/**
* Register a reactive type along with functions to adapt to and from a
* Register a reactive type along with functions to adapt to and from a
* Reactive Streams {@link Publisher}. The functions can assume their
* Reactive Streams {@link Publisher}. The functions can assume their
...
@@ -190,6 +164,31 @@ public class ReactiveAdapterRegistry {
...
@@ -190,6 +164,31 @@ public class ReactiveAdapterRegistry {
}
}
/**
* Return a shared default {@code ReactiveAdapterRegistry} instance, lazily
* building it once needed.
* <p><b>NOTE:</b> We highly recommend passing a long-lived, pre-configured
* {@code ReactiveAdapterRegistry} instance for customization purposes.
* This accessor is only meant as a fallback for code paths that want to
* fall back on a default instance if one isn't provided.
* @return the shared {@code ReactiveAdapterRegistry} instance (never {@code null})
* @since 5.0.2
*/
public
static
ReactiveAdapterRegistry
getSharedInstance
()
{
ReactiveAdapterRegistry
ar
=
sharedInstance
;
if
(
ar
==
null
)
{
synchronized
(
ReactiveAdapterRegistry
.
class
)
{
ar
=
sharedInstance
;
if
(
ar
==
null
)
{
ar
=
new
ReactiveAdapterRegistry
();
sharedInstance
=
ar
;
}
}
}
return
ar
;
}
private
static
class
ReactorRegistrar
{
private
static
class
ReactorRegistrar
{
void
registerAdapters
(
ReactiveAdapterRegistry
registry
)
{
void
registerAdapters
(
ReactiveAdapterRegistry
registry
)
{
...
...
spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService.java
浏览文件 @
58431735
...
@@ -44,6 +44,15 @@ public class DefaultConversionService extends GenericConversionService {
...
@@ -44,6 +44,15 @@ public class DefaultConversionService extends GenericConversionService {
private
static
volatile
DefaultConversionService
sharedInstance
;
private
static
volatile
DefaultConversionService
sharedInstance
;
/**
* Create a new {@code DefaultConversionService} with the set of
* {@linkplain DefaultConversionService#addDefaultConverters(ConverterRegistry) default converters}.
*/
public
DefaultConversionService
()
{
addDefaultConverters
(
this
);
}
/**
/**
* Return a shared default {@code ConversionService} instance,
* Return a shared default {@code ConversionService} instance,
* lazily building it once needed.
* lazily building it once needed.
...
@@ -69,18 +78,6 @@ public class DefaultConversionService extends GenericConversionService {
...
@@ -69,18 +78,6 @@ public class DefaultConversionService extends GenericConversionService {
return
cs
;
return
cs
;
}
}
/**
* Create a new {@code DefaultConversionService} with the set of
* {@linkplain DefaultConversionService#addDefaultConverters(ConverterRegistry) default converters}.
*/
public
DefaultConversionService
()
{
addDefaultConverters
(
this
);
}
// static utility methods
/**
/**
* Add converters appropriate for most environments.
* Add converters appropriate for most environments.
* @param converterRegistry the registry of converters to add to (must also be castable to ConversionService,
* @param converterRegistry the registry of converters to add to (must also be castable to ConversionService,
...
@@ -134,9 +131,6 @@ public class DefaultConversionService extends GenericConversionService {
...
@@ -134,9 +131,6 @@ public class DefaultConversionService extends GenericConversionService {
converterRegistry
.
addConverter
(
new
StreamConverter
(
conversionService
));
converterRegistry
.
addConverter
(
new
StreamConverter
(
conversionService
));
}
}
// internal helpers
private
static
void
addScalarConverters
(
ConverterRegistry
converterRegistry
)
{
private
static
void
addScalarConverters
(
ConverterRegistry
converterRegistry
)
{
converterRegistry
.
addConverterFactory
(
new
NumberToNumberConverterFactory
());
converterRegistry
.
addConverterFactory
(
new
NumberToNumberConverterFactory
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录