diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java b/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java index 5bd8ea7a9f..106fa0cafc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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; diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java index 8a9cb2dc56..d78e48b0a0 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesView.java @@ -62,13 +62,14 @@ public class TilesView extends AbstractUrlBasedView { * Specify whether to always include the view rather than forward to it. *
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()); diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java index 9da49e68d5..2269c1df53 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/TilesViewResolver.java @@ -48,25 +48,27 @@ public class TilesViewResolver extends UrlBasedViewResolver { setViewClass(requiredViewClass()); } - /** - * Specify whether to always include the view rather than forward to it. - *
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 - */ - public void setAlwaysInclude(Boolean alwaysInclude) { - this.alwaysInclude = alwaysInclude; - } /** - * Requires {@link TilesView}. + * This resolver requires {@link TilesView}. */ @Override protected Class> requiredViewClass() { return TilesView.class; } + /** + * Specify whether to always include the view rather than forward to it. + *
Default is "false". Switch this flag on to enforce the use of a
+ * Servlet include, even if a forward would be possible.
+ * @since 4.1.2
+ * @see TilesView#setAlwaysInclude
+ */
+ public void setAlwaysInclude(Boolean alwaysInclude) {
+ this.alwaysInclude = alwaysInclude;
+ }
+
+
@Override
protected AbstractUrlBasedView buildView(String viewName) throws Exception {
TilesView view = (TilesView) super.buildView(viewName);
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
index 978e245625..c2feaaf075 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
@@ -70,7 +70,7 @@ public class ResourceUrlProvider implements ApplicationListener 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()) {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java
index 40e15d59eb..c7fc14c521 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesView.java
@@ -81,8 +81,8 @@ public class TilesView extends AbstractUrlBasedView {
* Specify whether to always include the view rather than forward to it.
* 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;
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java
index b8c9f24835..b6e2c3b8ae 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/TilesViewResolver.java
@@ -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.
* 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 {