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 5bd8ea7a9f133050e815a5bfd0c2edb3fb86f6c3..106fa0cafc9c7eb9475026bb3b0eec91d638f7c0 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 8a9cb2dc565d00d58efcf8e08aeef2ba4ea4d80e..d78e48b0a074e0a1668f9afa9431bde0478f7cb8 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 9da49e68d5f99fed48ba75025fe4b47d58c26b44..2269c1df533e6171ba07cc406a653f8123ce8857 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,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. *
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 {
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 978e245625331499b769ce340d2ca34f154201fd..c2feaaf075cf721c0319197e88969a03624b8e54 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 40e15d59eb6f6efb8b5e1588e95b57e1eb26e788..c7fc14c5219b057970d8b18f7918c8d857964e3e 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 b8c9f24835cfdbe88dea56e80bd5ae5b405b164b..b6e2c3b8ae6775e8ebb8e049dfc5651cf40bbf04 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 {