Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
dab23a71
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 搜索 >>
提交
dab23a71
编写于
3月 23, 2009
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polishing
上级
df99929e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
27 deletion
+13
-27
org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java
...aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java
+9
-15
org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
...k/scheduling/concurrent/ScheduledExecutorFactoryBean.java
+4
-6
org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
...amework/scheduling/concurrent/ThreadPoolTaskExecutor.java
+0
-6
未找到文件。
org.springframework.aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java
浏览文件 @
dab23a71
/*
* Copyright 2002-200
7
the original author or authors.
* Copyright 2002-200
9
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.
...
...
@@ -69,17 +69,12 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
* Find and return the first AspectJ annotation on the given method
* (there <i>should</i> only be one anyway...)
*/
protected
static
AspectJAnnotation
findAspectJAnnotationOnMethod
(
Method
aMethod
)
{
Class
<?
extends
Annotation
>[]
classesToLookFor
=
(
Class
<?
extends
Annotation
>[])
new
Class
[]
{
Before
.
class
,
Around
.
class
,
After
.
class
,
AfterReturning
.
class
,
AfterThrowing
.
class
,
Pointcut
.
class
};
@SuppressWarnings
(
"unchecked"
)
protected
static
AspectJAnnotation
findAspectJAnnotationOnMethod
(
Method
method
)
{
Class
<?
extends
Annotation
>[]
classesToLookFor
=
new
Class
[]
{
Before
.
class
,
Around
.
class
,
After
.
class
,
AfterReturning
.
class
,
AfterThrowing
.
class
,
Pointcut
.
class
};
for
(
Class
<?
extends
Annotation
>
c
:
classesToLookFor
)
{
AspectJAnnotation
foundAnnotation
=
findAnnotation
(
aM
ethod
,
c
);
AspectJAnnotation
foundAnnotation
=
findAnnotation
(
m
ethod
,
c
);
if
(
foundAnnotation
!=
null
)
{
return
foundAnnotation
;
}
...
...
@@ -199,7 +194,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
// come first in the advice declaration.
int
typeOffset
=
paramTypes
.
length
-
argNames
.
length
;
for
(
int
i
=
0
;
i
<
ret
.
length
;
i
++)
{
ret
[
i
]
=
paramTypes
[
i
+
typeOffset
];
ret
[
i
]
=
paramTypes
[
i
+
typeOffset
];
}
return
ret
;
}
...
...
@@ -212,7 +207,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
AtAfterReturning
,
AtAfterThrowing
,
AtAround
}
;
}
/**
...
...
@@ -265,8 +260,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
private
String
resolveExpression
()
throws
Exception
{
String
expression
=
null
;
for
(
int
i
=
0
;
i
<
EXPRESSION_PROPERTIES
.
length
;
i
++)
{
String
methodName
=
EXPRESSION_PROPERTIES
[
i
];
for
(
String
methodName
:
EXPRESSION_PROPERTIES
)
{
Method
method
;
try
{
method
=
this
.
annotation
.
getClass
().
getDeclaredMethod
(
methodName
);
...
...
org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBean.java
浏览文件 @
dab23a71
...
...
@@ -23,9 +23,7 @@ import java.util.concurrent.ScheduledExecutorService;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ThreadFactory
;
import
org.springframework.beans.factory.DisposableBean
;
import
org.springframework.beans.factory.FactoryBean
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.scheduling.support.DelegatingExceptionProofRunnable
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -59,12 +57,14 @@ import org.springframework.util.ObjectUtils;
*
* @author Juergen Hoeller
* @since 2.0
* @see #setPoolSize
* @see #setThreadFactory
* @see ScheduledExecutorTask
* @see java.util.concurrent.ScheduledExecutorService
* @see java.util.concurrent.ScheduledThreadPoolExecutor
*/
public
class
ScheduledExecutorFactoryBean
extends
ExecutorConfigurationSupport
implements
FactoryBean
<
ScheduledExecutorService
>
,
InitializingBean
,
DisposableBean
{
implements
FactoryBean
<
ScheduledExecutorService
>
{
private
int
poolSize
=
1
;
...
...
@@ -144,10 +144,8 @@ public class ScheduledExecutorFactoryBean extends ExecutorConfigurationSupport
/**
* Create a new {@link ScheduledExecutorService} instance.
* Called by <code>afterPropertiesSet</code>.
* <p>The default implementation creates a {@link ScheduledThreadPoolExecutor}.
* Can be overridden in subclasses to provide custom
* {@link ScheduledExecutorService} instances.
* Can be overridden in subclasses to provide custom {@link ScheduledExecutorService} instances.
* @param poolSize the specified pool size
* @param threadFactory the ThreadFactory to use
* @param rejectedExecutionHandler the RejectedExecutionHandler to use
...
...
org.springframework.context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.java
浏览文件 @
dab23a71
...
...
@@ -235,12 +235,6 @@ public class ThreadPoolTaskExecutor extends ExecutorConfigurationSupport impleme
}
/**
* Implementation of both the JDK 1.5 Executor interface and the Spring
* TaskExecutor interface, delegating to the ThreadPoolExecutor instance.
* @see java.util.concurrent.Executor#execute(Runnable)
* @see org.springframework.core.task.TaskExecutor#execute(Runnable)
*/
public
void
execute
(
Runnable
task
)
{
Executor
executor
=
getThreadPoolExecutor
();
try
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录