Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
3570a9a9
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,体验更适合开发者的 AI 搜索 >>
提交
3570a9a9
编写于
2月 27, 2015
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
(cherry picked from commit
2b340946
)
上级
91c47a9e
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
43 addition
and
42 deletion
+43
-42
spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java
...ext/annotation/aspectj/SpringConfiguredConfiguration.java
+6
-5
spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java
...work/context/annotation/LoadTimeWeavingConfiguration.java
+3
-3
spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java
...ork/scheduling/annotation/AbstractAsyncConfiguration.java
+3
-2
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java
.../jdbc/datasource/init/ScriptStatementFailedException.java
+4
-5
spring-tx/src/main/java/org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.java
...n/annotation/ProxyTransactionManagementConfiguration.java
+4
-4
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java
...tation/DelegatingWebSocketMessageBrokerConfiguration.java
+23
-23
未找到文件。
spring-aspects/src/main/java/org/springframework/context/annotation/aspectj/SpringConfiguredConfiguration.java
浏览文件 @
3570a9a9
/*
* Copyright 2002-201
2
the original author or authors.
* Copyright 2002-201
5
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.
...
...
@@ -28,9 +28,9 @@ import org.springframework.context.annotation.Role;
* annotated with @{@link org.springframework.beans.factory.annotation.Configurable
* Configurable}.
*
* <p>This configuration class is automatically imported when using the
@{@link
*
EnableSpringConfigured} annotation. See {@code @EnableSpringConfigured} Javadoc for
* complete usage details.
* <p>This configuration class is automatically imported when using the
*
@{@link EnableSpringConfigured} annotation. See {@code @EnableSpringConfigured}'s
*
javadoc for
complete usage details.
*
* @author Chris Beams
* @since 3.1
...
...
@@ -42,9 +42,10 @@ public class SpringConfiguredConfiguration {
public
static
final
String
BEAN_CONFIGURER_ASPECT_BEAN_NAME
=
"org.springframework.context.config.internalBeanConfigurerAspect"
;
@Bean
(
name
=
BEAN_CONFIGURER_ASPECT_BEAN_NAME
)
@Bean
(
name
=
BEAN_CONFIGURER_ASPECT_BEAN_NAME
)
@Role
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
)
public
AnnotationBeanConfigurerAspect
beanConfigurerAspect
()
{
return
AnnotationBeanConfigurerAspect
.
aspectOf
();
}
}
spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java
浏览文件 @
3570a9a9
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
5
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.
...
...
@@ -47,7 +47,7 @@ public class LoadTimeWeavingConfiguration implements ImportAware, BeanClassLoade
private
AnnotationAttributes
enableLTW
;
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
private
LoadTimeWeavingConfigurer
ltwConfigurer
;
private
ClassLoader
beanClassLoader
;
...
...
@@ -66,7 +66,7 @@ public class LoadTimeWeavingConfiguration implements ImportAware, BeanClassLoade
}
@Bean
(
name
=
ConfigurableApplicationContext
.
LOAD_TIME_WEAVER_BEAN_NAME
)
@Bean
(
name
=
ConfigurableApplicationContext
.
LOAD_TIME_WEAVER_BEAN_NAME
)
@Role
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
)
public
LoadTimeWeaver
loadTimeWeaver
()
{
LoadTimeWeaver
loadTimeWeaver
=
null
;
...
...
spring-context/src/main/java/org/springframework/scheduling/annotation/AbstractAsyncConfiguration.java
浏览文件 @
3570a9a9
/*
* Copyright 2002-201
4
the original author or authors.
* Copyright 2002-201
5
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.
...
...
@@ -43,6 +43,7 @@ public abstract class AbstractAsyncConfiguration implements ImportAware {
protected
AnnotationAttributes
enableAsync
;
protected
Executor
executor
;
protected
AsyncUncaughtExceptionHandler
exceptionHandler
;
...
...
@@ -57,7 +58,7 @@ public abstract class AbstractAsyncConfiguration implements ImportAware {
/**
* Collect any {@link AsyncConfigurer} beans through autowiring.
*/
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
void
setConfigurers
(
Collection
<
AsyncConfigurer
>
configurers
)
{
if
(
CollectionUtils
.
isEmpty
(
configurers
))
{
return
;
...
...
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java
浏览文件 @
3570a9a9
...
...
@@ -31,15 +31,14 @@ public class ScriptStatementFailedException extends ScriptException {
/**
* Construct a new {@code ScriptStatementFailedException}.
* @param st
atemen
t the actual SQL statement that failed
* @param st
atemen
tNumber the statement number in the SQL script (i.e.,
* @param st
m
t the actual SQL statement that failed
* @param st
m
tNumber the statement number in the SQL script (i.e.,
* the nth statement present in the resource)
* @param resource the resource from which the SQL statement was read
* @param cause the underlying cause of the failure
*/
public
ScriptStatementFailedException
(
String
statement
,
int
statementNumber
,
EncodedResource
resource
,
Throwable
cause
)
{
super
(
"Failed to execute SQL script statement #"
+
statementNumber
+
" of resource "
+
resource
+
": "
+
statement
,
cause
);
public
ScriptStatementFailedException
(
String
stmt
,
int
stmtNumber
,
EncodedResource
resource
,
Throwable
cause
)
{
super
(
"Failed to execute SQL script statement #"
+
stmtNumber
+
" of resource "
+
resource
+
": "
+
stmt
,
cause
);
}
}
spring-tx/src/main/java/org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.java
浏览文件 @
3570a9a9
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
5
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.
...
...
@@ -26,8 +26,8 @@ import org.springframework.transaction.interceptor.TransactionAttributeSource;
import
org.springframework.transaction.interceptor.TransactionInterceptor
;
/**
* {@code @Configuration} class that registers the Spring infrastructure beans
necessary
* to enable proxy-based annotation-driven transaction management.
* {@code @Configuration} class that registers the Spring infrastructure beans
*
necessary
to enable proxy-based annotation-driven transaction management.
*
* @author Chris Beams
* @since 3.1
...
...
@@ -37,7 +37,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor;
@Configuration
public
class
ProxyTransactionManagementConfiguration
extends
AbstractTransactionManagementConfiguration
{
@Bean
(
name
=
TransactionManagementConfigUtils
.
TRANSACTION_ADVISOR_BEAN_NAME
)
@Bean
(
name
=
TransactionManagementConfigUtils
.
TRANSACTION_ADVISOR_BEAN_NAME
)
@Role
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
)
public
BeanFactoryTransactionAttributeSourceAdvisor
transactionAdvisor
()
{
BeanFactoryTransactionAttributeSourceAdvisor
advisor
=
new
BeanFactoryTransactionAttributeSourceAdvisor
();
...
...
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java
浏览文件 @
3570a9a9
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
5
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.
...
...
@@ -29,10 +29,10 @@ import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import
org.springframework.util.CollectionUtils
;
/**
* A {@link WebSocketMessageBrokerConfigurationSupport} extension that detects
beans of type
*
{@link WebSocketMessageBrokerConfigurer}
*
and delegates to all of them allowing callback style customization of the
*
configuration provided
in {@link WebSocketMessageBrokerConfigurationSupport}.
* A {@link WebSocketMessageBrokerConfigurationSupport} extension that detects
*
beans of type {@link WebSocketMessageBrokerConfigurer} and delegates to all
*
of them allowing callback style customization of the configuration provided
* in {@link WebSocketMessageBrokerConfigurationSupport}.
*
* <p>This class is typically imported via {@link EnableWebSocketMessageBroker}.
*
...
...
@@ -42,10 +42,10 @@ import org.springframework.util.CollectionUtils;
@Configuration
public
class
DelegatingWebSocketMessageBrokerConfiguration
extends
WebSocketMessageBrokerConfigurationSupport
{
private
List
<
WebSocketMessageBrokerConfigurer
>
configurers
=
new
ArrayList
<
WebSocketMessageBrokerConfigurer
>();
private
final
List
<
WebSocketMessageBrokerConfigurer
>
configurers
=
new
ArrayList
<
WebSocketMessageBrokerConfigurer
>();
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
public
void
setConfigurers
(
List
<
WebSocketMessageBrokerConfigurer
>
configurers
)
{
if
(!
CollectionUtils
.
isEmpty
(
configurers
))
{
this
.
configurers
.
addAll
(
configurers
);
...
...
@@ -55,51 +55,51 @@ public class DelegatingWebSocketMessageBrokerConfiguration extends WebSocketMess
@Override
protected
void
registerStompEndpoints
(
StompEndpointRegistry
registry
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
registerStompEndpoints
(
registry
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
registerStompEndpoints
(
registry
);
}
}
@Override
protected
void
configureWebSocketTransport
(
WebSocketTransportRegistration
registration
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
configureWebSocketTransport
(
registration
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
configureWebSocketTransport
(
registration
);
}
}
@Override
protected
void
configureClientInboundChannel
(
ChannelRegistration
registration
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
configureClientInboundChannel
(
registration
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
configureClientInboundChannel
(
registration
);
}
}
@Override
protected
void
configureClientOutboundChannel
(
ChannelRegistration
registration
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
configureClientOutboundChannel
(
registration
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
configureClientOutboundChannel
(
registration
);
}
}
@Override
protected
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
addArgumentResolvers
(
argumentResolvers
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
addArgumentResolvers
(
argumentResolvers
);
}
}
@Override
protected
void
addReturnValueHandlers
(
List
<
HandlerMethodReturnValueHandler
>
returnValueHandlers
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
addReturnValueHandlers
(
returnValueHandlers
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
addReturnValueHandlers
(
returnValueHandlers
);
}
}
@Override
protected
boolean
configureMessageConverters
(
List
<
MessageConverter
>
messageConverters
)
{
boolean
registerDefaults
=
true
;
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
if
(!
c
.
configureMessageConverters
(
messageConverters
))
{
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
if
(!
c
onfigurer
.
configureMessageConverters
(
messageConverters
))
{
registerDefaults
=
false
;
}
}
...
...
@@ -108,8 +108,8 @@ public class DelegatingWebSocketMessageBrokerConfiguration extends WebSocketMess
@Override
protected
void
configureMessageBroker
(
MessageBrokerRegistry
registry
)
{
for
(
WebSocketMessageBrokerConfigurer
c
:
this
.
configurers
)
{
c
.
configureMessageBroker
(
registry
);
for
(
WebSocketMessageBrokerConfigurer
c
onfigurer
:
this
.
configurers
)
{
c
onfigurer
.
configureMessageBroker
(
registry
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录