Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
3948727b
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,发现更多精彩内容 >>
提交
3948727b
编写于
1月 03, 2014
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
de280b01
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
11 addition
and
11 deletion
+11
-11
spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java
.../servlet/config/AnnotationDrivenBeanDefinitionParser.java
+11
-11
未找到文件。
spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java
浏览文件 @
3948727b
...
@@ -174,7 +174,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -174,7 +174,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
RuntimeBeanReference
conversionService
=
getConversionService
(
element
,
source
,
parserContext
);
RuntimeBeanReference
conversionService
=
getConversionService
(
element
,
source
,
parserContext
);
RuntimeBeanReference
validator
=
getValidator
(
element
,
source
,
parserContext
);
RuntimeBeanReference
validator
=
getValidator
(
element
,
source
,
parserContext
);
RuntimeBeanReference
messageCodesResolver
=
getMessageCodesResolver
(
element
,
source
,
parserContext
);
RuntimeBeanReference
messageCodesResolver
=
getMessageCodesResolver
(
element
);
RootBeanDefinition
bindingDef
=
new
RootBeanDefinition
(
ConfigurableWebBindingInitializer
.
class
);
RootBeanDefinition
bindingDef
=
new
RootBeanDefinition
(
ConfigurableWebBindingInitializer
.
class
);
bindingDef
.
setSource
(
source
);
bindingDef
.
setSource
(
source
);
...
@@ -185,9 +185,9 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -185,9 +185,9 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
ManagedList
<?>
messageConverters
=
getMessageConverters
(
element
,
source
,
parserContext
);
ManagedList
<?>
messageConverters
=
getMessageConverters
(
element
,
source
,
parserContext
);
ManagedList
<?>
argumentResolvers
=
getArgumentResolvers
(
element
,
parserContext
);
ManagedList
<?>
argumentResolvers
=
getArgumentResolvers
(
element
,
parserContext
);
ManagedList
<?>
returnValueHandlers
=
getReturnValueHandlers
(
element
,
source
,
parserContext
);
ManagedList
<?>
returnValueHandlers
=
getReturnValueHandlers
(
element
,
parserContext
);
String
asyncTimeout
=
getAsyncTimeout
(
element
,
source
,
parserContext
);
String
asyncTimeout
=
getAsyncTimeout
(
element
);
RuntimeBeanReference
asyncExecutor
=
getAsyncExecutor
(
element
,
source
,
parserContext
);
RuntimeBeanReference
asyncExecutor
=
getAsyncExecutor
(
element
);
ManagedList
<?>
callableInterceptors
=
getCallableInterceptors
(
element
,
source
,
parserContext
);
ManagedList
<?>
callableInterceptors
=
getCallableInterceptors
(
element
,
source
,
parserContext
);
ManagedList
<?>
deferredResultInterceptors
=
getDeferredResultInterceptors
(
element
,
source
,
parserContext
);
ManagedList
<?>
deferredResultInterceptors
=
getDeferredResultInterceptors
(
element
,
source
,
parserContext
);
...
@@ -349,7 +349,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -349,7 +349,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
return
props
;
return
props
;
}
}
private
RuntimeBeanReference
getMessageCodesResolver
(
Element
element
,
Object
source
,
ParserContext
parserContext
)
{
private
RuntimeBeanReference
getMessageCodesResolver
(
Element
element
)
{
if
(
element
.
hasAttribute
(
"message-codes-resolver"
))
{
if
(
element
.
hasAttribute
(
"message-codes-resolver"
))
{
return
new
RuntimeBeanReference
(
element
.
getAttribute
(
"message-codes-resolver"
));
return
new
RuntimeBeanReference
(
element
.
getAttribute
(
"message-codes-resolver"
));
}
}
...
@@ -358,12 +358,12 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -358,12 +358,12 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
}
}
}
}
private
String
getAsyncTimeout
(
Element
element
,
Object
source
,
ParserContext
parserContext
)
{
private
String
getAsyncTimeout
(
Element
element
)
{
Element
asyncElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"async-support"
);
Element
asyncElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"async-support"
);
return
(
asyncElement
!=
null
)
?
asyncElement
.
getAttribute
(
"default-timeout"
)
:
null
;
return
(
asyncElement
!=
null
)
?
asyncElement
.
getAttribute
(
"default-timeout"
)
:
null
;
}
}
private
RuntimeBeanReference
getAsyncExecutor
(
Element
element
,
Object
source
,
ParserContext
parserContext
)
{
private
RuntimeBeanReference
getAsyncExecutor
(
Element
element
)
{
Element
asyncElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"async-support"
);
Element
asyncElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"async-support"
);
if
(
asyncElement
!=
null
)
{
if
(
asyncElement
!=
null
)
{
if
(
asyncElement
.
hasAttribute
(
"task-executor"
))
{
if
(
asyncElement
.
hasAttribute
(
"task-executor"
))
{
...
@@ -416,7 +416,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -416,7 +416,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
return
null
;
return
null
;
}
}
private
ManagedList
<?>
getReturnValueHandlers
(
Element
element
,
Object
source
,
ParserContext
parserContext
)
{
private
ManagedList
<?>
getReturnValueHandlers
(
Element
element
,
ParserContext
parserContext
)
{
Element
handlersElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"return-value-handlers"
);
Element
handlersElement
=
DomUtils
.
getChildElementByTagName
(
element
,
"return-value-handlers"
);
if
(
handlersElement
!=
null
)
{
if
(
handlersElement
!=
null
)
{
return
extractBeanSubElements
(
handlersElement
,
parserContext
);
return
extractBeanSubElements
(
handlersElement
,
parserContext
);
...
@@ -430,7 +430,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -430,7 +430,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
ManagedList
<?
super
Object
>
messageConverters
=
new
ManagedList
<
Object
>();
ManagedList
<?
super
Object
>
messageConverters
=
new
ManagedList
<
Object
>();
if
(
convertersElement
!=
null
)
{
if
(
convertersElement
!=
null
)
{
messageConverters
.
setSource
(
source
);
messageConverters
.
setSource
(
source
);
for
(
Element
beanElement
:
DomUtils
.
getChildElementsByTagName
(
convertersElement
,
new
String
[]
{
"bean"
,
"ref"
}
))
{
for
(
Element
beanElement
:
DomUtils
.
getChildElementsByTagName
(
convertersElement
,
"bean"
,
"ref"
))
{
Object
object
=
parserContext
.
getDelegate
().
parsePropertySubElement
(
beanElement
,
null
);
Object
object
=
parserContext
.
getDelegate
().
parsePropertySubElement
(
beanElement
,
null
);
messageConverters
.
add
(
object
);
messageConverters
.
add
(
object
);
}
}
...
@@ -466,8 +466,8 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
...
@@ -466,8 +466,8 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
}
}
return
messageConverters
;
return
messageConverters
;
}
}
@SuppressWarnings
(
"rawtypes"
)
private
RootBeanDefinition
createConverterDefinition
(
Class
<?
extends
HttpMessageConverter
>
converterClass
,
Object
source
)
{
private
RootBeanDefinition
createConverterDefinition
(
Class
<?>
converterClass
,
Object
source
)
{
RootBeanDefinition
beanDefinition
=
new
RootBeanDefinition
(
converterClass
);
RootBeanDefinition
beanDefinition
=
new
RootBeanDefinition
(
converterClass
);
beanDefinition
.
setSource
(
source
);
beanDefinition
.
setSource
(
source
);
beanDefinition
.
setRole
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
);
beanDefinition
.
setRole
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录