Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
f300325b
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,发现更多精彩内容 >>
提交
f300325b
编写于
7月 08, 2015
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
e3bb06c8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
spring-context/src/main/java/org/springframework/context/event/EventListener.java
...java/org/springframework/context/event/EventListener.java
+6
-6
spring-tx/src/main/java/org/springframework/transaction/event/TransactionalEventListener.java
...amework/transaction/event/TransactionalEventListener.java
+11
-11
未找到文件。
spring-context/src/main/java/org/springframework/context/event/EventListener.java
浏览文件 @
f300325b
...
@@ -29,7 +29,7 @@ import org.springframework.core.annotation.AliasFor;
...
@@ -29,7 +29,7 @@ import org.springframework.core.annotation.AliasFor;
* Annotation that marks a method to listen for application events. The
* Annotation that marks a method to listen for application events. The
* method may have one (and only one) parameter that reflects the event
* method may have one (and only one) parameter that reflects the event
* type to listen to. Or this annotation may refer to the event type(s)
* type to listen to. Or this annotation may refer to the event type(s)
* using the {@link #classes
()
} attribute. Events can be {@link ApplicationEvent}
* using the {@link #classes} attribute. Events can be {@link ApplicationEvent}
* instances as well as arbitrary objects.
* instances as well as arbitrary objects.
*
*
* <p>Processing of {@code @EventListener} annotations is performed via
* <p>Processing of {@code @EventListener} annotations is performed via
...
@@ -57,16 +57,16 @@ import org.springframework.core.annotation.AliasFor;
...
@@ -57,16 +57,16 @@ import org.springframework.core.annotation.AliasFor;
public
@interface
EventListener
{
public
@interface
EventListener
{
/**
/**
* Alias for {@link #classes
()
}.
* Alias for {@link #classes}.
*/
*/
@AliasFor
(
attribute
=
"classes"
)
@AliasFor
(
attribute
=
"classes"
)
Class
<?>[]
value
()
default
{};
Class
<?>[]
value
()
default
{};
/**
/**
* The event classes that this listener handles.
When this attribute is specified
* The event classes that this listener handles.
*
with one value, the method parameter may or may not be specified. When this
*
<p>When this attribute is specified with one value, the method parameter
*
attribute is specified with more than one value, the method must not have a
*
may or may not be specified. When this attribute is specified with more
* parameter.
*
than one value, the method must not have a
parameter.
*/
*/
@AliasFor
(
attribute
=
"value"
)
@AliasFor
(
attribute
=
"value"
)
Class
<?>[]
classes
()
default
{};
Class
<?>[]
classes
()
default
{};
...
...
spring-tx/src/main/java/org/springframework/transaction/event/TransactionalEventListener.java
浏览文件 @
f300325b
...
@@ -29,7 +29,7 @@ import org.springframework.core.annotation.AliasFor;
...
@@ -29,7 +29,7 @@ import org.springframework.core.annotation.AliasFor;
* An {@link EventListener} that is invoked according to a {@link TransactionPhase}.
* An {@link EventListener} that is invoked according to a {@link TransactionPhase}.
*
*
* <p>If the event is not published within the boundaries of a managed transaction, the event
* <p>If the event is not published within the boundaries of a managed transaction, the event
* is discarded unless the {@link #fallbackExecution
()
} flag is explicitly set. If a
* is discarded unless the {@link #fallbackExecution} flag is explicitly set. If a
* transaction is running, the event is processed according to its {@link TransactionPhase}.
* transaction is running, the event is processed according to its {@link TransactionPhase}.
*
*
* <p>Adding {@link org.springframework.core.annotation.Order @Order} on your annotated method
* <p>Adding {@link org.springframework.core.annotation.Order @Order} on your annotated method
...
@@ -45,28 +45,28 @@ import org.springframework.core.annotation.AliasFor;
...
@@ -45,28 +45,28 @@ import org.springframework.core.annotation.AliasFor;
public
@interface
TransactionalEventListener
{
public
@interface
TransactionalEventListener
{
/**
/**
* Phase to bind the handling of an event to.
If no transaction is in progress, the
* Phase to bind the handling of an event to.
*
event is not processed at all unless {@link #fallbackExecution} has been
*
<p>If no transaction is in progress, the event is not processed at
* enabled explicitly.
*
all unless {@link #fallbackExecution} has been
enabled explicitly.
*/
*/
TransactionPhase
phase
()
default
TransactionPhase
.
AFTER_COMMIT
;
TransactionPhase
phase
()
default
TransactionPhase
.
AFTER_COMMIT
;
/**
/**
*
Specify if
the event should be processed if no transaction is running.
*
Whether
the event should be processed if no transaction is running.
*/
*/
boolean
fallbackExecution
()
default
false
;
boolean
fallbackExecution
()
default
false
;
/**
/**
* Alias for {@link #classes
()
}.
* Alias for {@link #classes}.
*/
*/
@AliasFor
(
attribute
=
"classes"
)
@AliasFor
(
attribute
=
"classes"
)
Class
<?>[]
value
()
default
{};
Class
<?>[]
value
()
default
{};
/**
/**
* The event classes that this listener handles.
When this attribute is specified
* The event classes that this listener handles.
*
with one value, the method parameter may or may not be specified. When this
*
<p>When this attribute is specified with one value, the method parameter
*
attribute is specified with more than one value, the method must not have a
*
may or may not be specified. When this attribute is specified with more
* parameter.
*
than one value, the method must not have a
parameter.
*/
*/
@AliasFor
(
attribute
=
"value"
)
@AliasFor
(
attribute
=
"value"
)
Class
<?>[]
classes
()
default
{};
Class
<?>[]
classes
()
default
{};
...
@@ -74,7 +74,7 @@ public @interface TransactionalEventListener {
...
@@ -74,7 +74,7 @@ public @interface TransactionalEventListener {
/**
/**
* Spring Expression Language (SpEL) attribute used for making the event
* Spring Expression Language (SpEL) attribute used for making the event
* handling conditional.
* handling conditional.
* <p>Default is
""
, meaning the event is always handled.
* <p>Default is
{@code ""}
, meaning the event is always handled.
* @see EventListener#condition
* @see EventListener#condition
*/
*/
String
condition
()
default
""
;
String
condition
()
default
""
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录