Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
dbd82d12
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,发现更多精彩内容 >>
提交
dbd82d12
编写于
5月 07, 2015
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
e87dc9f8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
14 deletion
+20
-14
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
...pringframework/aop/aspectj/AspectJExpressionPointcut.java
+2
-3
spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java
...work/context/event/GenericApplicationListenerAdapter.java
+2
-0
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
...va/org/springframework/core/GenericTypeResolverTests.java
+7
-7
spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java
.../springframework/web/servlet/NoHandlerFoundException.java
+9
-4
未找到文件。
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
浏览文件 @
dbd82d12
/*
* 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.
...
...
@@ -203,8 +203,7 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut
pointcutParameters
[
i
]
=
parser
.
createPointcutParameter
(
this
.
pointcutParameterNames
[
i
],
this
.
pointcutParameterTypes
[
i
]);
}
return
parser
.
parsePointcutExpression
(
replaceBooleanOperators
(
getExpression
()),
return
parser
.
parsePointcutExpression
(
replaceBooleanOperators
(
getExpression
()),
this
.
pointcutDeclarationScope
,
pointcutParameters
);
}
...
...
spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java
浏览文件 @
dbd82d12
...
...
@@ -38,6 +38,7 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList
private
final
ResolvableType
declaredEventType
;
/**
* Create a new GenericApplicationListener for the given delegate.
* @param delegate the delegate listener to be invoked
...
...
@@ -87,6 +88,7 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList
return
(
this
.
delegate
instanceof
Ordered
?
((
Ordered
)
this
.
delegate
).
getOrder
()
:
Ordered
.
LOWEST_PRECEDENCE
);
}
static
ResolvableType
resolveDeclaredEventType
(
Class
<?>
listenerType
)
{
ResolvableType
resolvableType
=
ResolvableType
.
forClass
(
listenerType
).
as
(
ApplicationListener
.
class
);
if
(
resolvableType
==
null
||
!
resolvableType
.
hasGenerics
())
{
...
...
spring-core/src/test/java/org/springframework/core/GenericTypeResolverTests.java
浏览文件 @
dbd82d12
/*
* 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.
...
...
@@ -67,12 +67,12 @@ public class GenericTypeResolverTests {
@Test
public
void
methodReturnTypes
()
{
assertEquals
(
Integer
.
class
,
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"integer"
),
MyInterfaceType
.
class
));
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"integer"
),
MyInterfaceType
.
class
));
assertEquals
(
String
.
class
,
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"string"
),
MyInterfaceType
.
class
));
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"string"
),
MyInterfaceType
.
class
));
assertEquals
(
null
,
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"raw"
),
MyInterfaceType
.
class
));
assertEquals
(
null
,
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"object"
),
MyInterfaceType
.
class
));
resolveReturnTypeArgument
(
findMethod
(
MyTypeWithMethods
.
class
,
"object"
),
MyInterfaceType
.
class
));
}
@Test
...
...
@@ -81,13 +81,13 @@ public class GenericTypeResolverTests {
Method
intMessageMethod
=
findMethod
(
MyTypeWithMethods
.
class
,
"readIntegerInputMessage"
,
MyInterfaceType
.
class
);
MethodParameter
intMessageMethodParam
=
new
MethodParameter
(
intMessageMethod
,
0
);
assertEquals
(
MyInterfaceType
.
class
,
resolveType
(
intMessageMethodParam
.
getGenericParameterType
(),
new
HashMap
<
TypeVariable
,
Type
>()));
resolveType
(
intMessageMethodParam
.
getGenericParameterType
(),
new
HashMap
<
TypeVariable
,
Type
>()));
Method
intArrMessageMethod
=
findMethod
(
MyTypeWithMethods
.
class
,
"readIntegerArrayInputMessage"
,
MyInterfaceType
[].
class
);
MyInterfaceType
[].
class
);
MethodParameter
intArrMessageMethodParam
=
new
MethodParameter
(
intArrMessageMethod
,
0
);
assertEquals
(
MyInterfaceType
[].
class
,
resolveType
(
intArrMessageMethodParam
.
getGenericParameterType
(),
new
HashMap
<
TypeVariable
,
Type
>()));
resolveType
(
intArrMessageMethodParam
.
getGenericParameterType
(),
new
HashMap
<
TypeVariable
,
Type
>()));
Method
genericArrMessageMethod
=
findMethod
(
MySimpleTypeWithMethods
.
class
,
"readGenericArrayInputMessage"
,
Object
[].
class
);
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/NoHandlerFoundException.java
浏览文件 @
dbd82d12
/*
* 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.
...
...
@@ -13,20 +13,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.springframework.web.servlet
;
import
javax.servlet.ServletException
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.http.HttpHeaders
;
/**
* Exception to be thrown if DispatcherServlet is unable to determine a corresponding
* handler for an incoming HTTP request. The DispatcherServlet throws this exception
only
*
if its throwExceptionIfNoHandlerFound
property is set to "true".
* handler for an incoming HTTP request. The DispatcherServlet throws this exception
*
only if its "throwExceptionIfNoHandlerFound"
property is set to "true".
*
* @author Brian Clozel
* @since 4.0
* @see org.springframework.web.servlet.DispatcherServlet
* @see DispatcherServlet#setThrowExceptionIfNoHandlerFound(boolean)
* @see DispatcherServlet#noHandlerFound(HttpServletRequest, HttpServletResponse)
*/
@SuppressWarnings
(
"serial"
)
public
class
NoHandlerFoundException
extends
ServletException
{
...
...
@@ -51,6 +55,7 @@ public class NoHandlerFoundException extends ServletException {
this
.
headers
=
headers
;
}
public
String
getHttpMethod
()
{
return
this
.
httpMethod
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录