Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
97ea4368
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,发现更多精彩内容 >>
提交
97ea4368
编写于
11月 01, 2014
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polishing
上级
e2518e0b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
38 addition
and
35 deletion
+38
-35
spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java
...ramework/beans/factory/NoSuchBeanDefinitionException.java
+7
-5
spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java
...rg/springframework/web/servlet/view/tiles2/TilesView.java
+2
-1
spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java
...gframework/web/servlet/view/tiles2/TilesViewResolver.java
+10
-8
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
...ngframework/web/servlet/resource/ResourceUrlProvider.java
+7
-12
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java
...rg/springframework/web/servlet/view/tiles3/TilesView.java
+2
-1
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java
...gframework/web/servlet/view/tiles3/TilesViewResolver.java
+10
-8
未找到文件。
spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java
浏览文件 @
97ea4368
/*
* Copyright 2002-201
3
the original author or authors.
* Copyright 2002-201
4
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.
...
...
@@ -20,21 +20,23 @@ import org.springframework.beans.BeansException;
import
org.springframework.util.StringUtils
;
/**
* Exception thrown when a {@code BeanFactory} is asked for a bean instance
* for which it cannot find a definition.
* Exception thrown when a {@code BeanFactory} is asked for a bean instance for which it
* cannot find a definition. This may point to a non-existing bean, a non-unique bean,
* or a manually registered singleton instance without an associated bean definition.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see BeanFactory#getBean(String)
* @see BeanFactory#getBean(Class)
* @see NoUniqueBeanDefinitionException
*/
@SuppressWarnings
(
"serial"
)
public
class
NoSuchBeanDefinitionException
extends
BeansException
{
/** Name of the missing bean
.
*/
/** Name of the missing bean */
private
String
beanName
;
/** Required type of the missing bean
.
*/
/** Required type of the missing bean */
private
Class
<?>
beanType
;
...
...
spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java
浏览文件 @
97ea4368
...
...
@@ -62,13 +62,14 @@ public class TilesView extends AbstractUrlBasedView {
* Specify whether to always include the view rather than forward to it.
* <p>Default is "false". Switch this flag on to enforce the use of a
* Servlet include, even if a forward would be possible.
* @see TilesViewResolver#setAlwaysInclude(Boolean)
* @since 4.1.2
* @see TilesViewResolver#setAlwaysInclude
*/
public
void
setAlwaysInclude
(
boolean
alwaysInclude
)
{
this
.
alwaysInclude
=
alwaysInclude
;
}
@Override
public
boolean
checkResource
(
final
Locale
locale
)
throws
Exception
{
TilesContainer
container
=
ServletUtil
.
getContainer
(
getServletContext
());
...
...
spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java
浏览文件 @
97ea4368
...
...
@@ -48,24 +48,26 @@ public class TilesViewResolver extends UrlBasedViewResolver {
setViewClass
(
requiredViewClass
());
}
/**
* This resolver requires {@link TilesView}.
*/
@Override
protected
Class
<?>
requiredViewClass
()
{
return
TilesView
.
class
;
}
/**
* Specify whether to always include the view rather than forward to it.
* <p>Default is "false". Switch this flag on to enforce the use of a
* Servlet include, even if a forward would be possible.
* @see TilesView#setAlwaysInclude
* @since 4.1.2
* @see TilesView#setAlwaysInclude
*/
public
void
setAlwaysInclude
(
Boolean
alwaysInclude
)
{
this
.
alwaysInclude
=
alwaysInclude
;
}
/**
* Requires {@link TilesView}.
*/
@Override
protected
Class
<?>
requiredViewClass
()
{
return
TilesView
.
class
;
}
@Override
protected
AbstractUrlBasedView
buildView
(
String
viewName
)
throws
Exception
{
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
浏览文件 @
97ea4368
...
...
@@ -70,7 +70,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
/**
*
@r
eturn the configured {@code UrlPathHelper}.
*
R
eturn the configured {@code UrlPathHelper}.
*/
public
UrlPathHelper
getPathHelper
()
{
return
this
.
pathHelper
;
...
...
@@ -85,7 +85,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
/**
*
@r
eturn the configured {@code PathMatcher}.
*
R
eturn the configured {@code PathMatcher}.
*/
public
PathMatcher
getPathMatcher
()
{
return
this
.
pathMatcher
;
...
...
@@ -93,7 +93,6 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
/**
* Manually configure the resource mappings.
*
* <p><strong>Note:</strong> by default resource mappings are auto-detected
* from the Spring {@code ApplicationContext}. However if this property is
* used, the auto-detection is turned off.
...
...
@@ -107,7 +106,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
/**
*
@r
eturn the resource mappings, either manually configured or auto-detected
*
R
eturn the resource mappings, either manually configured or auto-detected
* when the Spring {@code ApplicationContext} is refreshed.
*/
public
Map
<
String
,
ResourceHttpRequestHandler
>
getHandlerMap
()
{
...
...
@@ -115,7 +114,7 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
/**
*
@r
eturn {@code false} if resource mappings were manually configured,
*
R
eturn {@code false} if resource mappings were manually configured,
* {@code true} otherwise.
*/
public
boolean
isAutodetect
()
{
...
...
@@ -134,7 +133,6 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
}
protected
void
detectResourceHandlers
(
ApplicationContext
appContext
)
{
logger
.
debug
(
"Looking for resource handler mappings"
);
Map
<
String
,
SimpleUrlHandlerMapping
>
map
=
appContext
.
getBeansOfType
(
SimpleUrlHandlerMapping
.
class
);
...
...
@@ -162,7 +160,6 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
* A variation on {@link #getForLookupPath(String)} that accepts a full request
* URL path (i.e. including context and servlet path) and returns the full request
* URL path to expose for public use.
*
* @param request the current request
* @param requestUrl the request URL path to resolve
* @return the resolved public URL path or {@code null} if unresolved
...
...
@@ -189,12 +186,10 @@ public class ResourceUrlProvider implements ApplicationListener<ContextRefreshed
* if a match is found use the {@code ResourceResolver} chain of the matched
* {@code ResourceHttpRequestHandler} to resolve the URL path to expose for
* public use.
*
* <p>It is expected the given path is what Spring MVC would use for request
* mapping purposes, i.e. excluding context and servlet path portions.
*
* <p>It is expected that the given path is what Spring MVC would use for
* request mapping purposes, i.e. excluding context and servlet path portions.
* @param lookupPath the lookup path to check
* @return the resolved public URL path or {@code null} if unresolved
* @return the resolved public URL path
,
or {@code null} if unresolved
*/
public
final
String
getForLookupPath
(
String
lookupPath
)
{
if
(
logger
.
isTraceEnabled
())
{
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java
浏览文件 @
97ea4368
...
...
@@ -81,8 +81,8 @@ public class TilesView extends AbstractUrlBasedView {
* Specify whether to always include the view rather than forward to it.
* <p>Default is "false". Switch this flag on to enforce the use of a
* Servlet include, even if a forward would be possible.
* @see TilesViewResolver#setAlwaysInclude(Boolean)
* @since 4.1.2
* @see TilesViewResolver#setAlwaysInclude
*/
public
void
setAlwaysInclude
(
boolean
alwaysInclude
)
{
this
.
alwaysInclude
=
alwaysInclude
;
...
...
@@ -99,6 +99,7 @@ public class TilesView extends AbstractUrlBasedView {
}
}
@Override
public
boolean
checkResource
(
final
Locale
locale
)
throws
Exception
{
HttpServletRequest
servletRequest
=
null
;
...
...
spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java
浏览文件 @
97ea4368
...
...
@@ -41,6 +41,15 @@ public class TilesViewResolver extends UrlBasedViewResolver {
setViewClass
(
requiredViewClass
());
}
/**
* This resolver requires {@link TilesView}.
*/
@Override
protected
Class
<?>
requiredViewClass
()
{
return
TilesView
.
class
;
}
/**
* Set the {@link Renderer} to use. If not specified, a default
* {@link org.apache.tiles.renderer.DefinitionRenderer} will be used.
...
...
@@ -54,20 +63,13 @@ public class TilesViewResolver extends UrlBasedViewResolver {
* Specify whether to always include the view rather than forward to it.
* <p>Default is "false". Switch this flag on to enforce the use of a
* Servlet include, even if a forward would be possible.
* @see TilesView#setAlwaysInclude
* @since 4.1.2
* @see TilesView#setAlwaysInclude
*/
public
void
setAlwaysInclude
(
Boolean
alwaysInclude
)
{
this
.
alwaysInclude
=
alwaysInclude
;
}
/**
* Requires {@link TilesView}.
*/
@Override
protected
Class
<?>
requiredViewClass
()
{
return
TilesView
.
class
;
}
@Override
protected
TilesView
buildView
(
String
viewName
)
throws
Exception
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录