36
36
import org .springframework .web .servlet .View ;
37
37
38
38
/**
39
- * {@link org.springframework.web.servlet.ViewResolver} implementation
40
- * that uses bean definitions in a {@link ResourceBundle}, specified by
41
- * the bundle basename.
39
+ * A {@link org.springframework.web.servlet.ViewResolver} implementation that uses
40
+ * bean definitions in a {@link ResourceBundle}, specified by the bundle basename.
42
41
*
43
- * <p>The bundle is typically defined in a properties file, located in
44
- * the class path. The default bundle basename is "views".
42
+ * <p>The bundle is typically defined in a properties file, located in the classpath.
43
+ * The default bundle basename is "views".
45
44
*
46
- * <p>This {@code ViewResolver} supports localized view definitions,
47
- * using the default support of {@link java.util.PropertyResourceBundle}.
48
- * For example, the basename "views" will be resolved as class path resources
49
- * "views_de_AT.properties", "views_de.properties", "views.properties" -
50
- * for a given Locale "de_AT".
45
+ * <p>This {@code ViewResolver} supports localized view definitions, using the
46
+ * default support of {@link java.util.PropertyResourceBundle}. For example, the
47
+ * basename "views" will be resolved as class path resources "views_de_AT.properties",
48
+ * "views_de.properties", "views.properties" - for a given Locale "de_AT".
51
49
*
52
- * <p>Note: this {@code ViewResolver} implements the {@link Ordered}
53
- * interface to allow for flexible participation in {@code ViewResolver}
54
- * chaining. For example, some special views could be defined via this
55
- * {@code ViewResolver} (giving it 0 as "order" value), while all
56
- * remaining views could be resolved by a {@link UrlBasedViewResolver}.
50
+ * <p>Note: This {@code ViewResolver} implements the {@link Ordered} interface
51
+ * in order to allow for flexible participation in {@code ViewResolver} chaining.
52
+ * For example, some special views could be defined via this {@code ViewResolver}
53
+ * (giving it 0 as "order" value), while all remaining views could be resolved by
54
+ * a {@link UrlBasedViewResolver}.
57
55
*
58
56
* @author Rod Johnson
59
57
* @author Juergen Hoeller
@@ -110,7 +108,7 @@ public int getOrder() {
110
108
* @see java.util.ResourceBundle#getBundle(String)
111
109
*/
112
110
public void setBasename (String basename ) {
113
- setBasenames (new String [] { basename } );
111
+ setBasenames (basename );
114
112
}
115
113
116
114
/**
@@ -173,7 +171,7 @@ public void setDefaultParentView(String defaultParentView) {
173
171
* <p>Allows for pre-initialization of common Locales, eagerly checking
174
172
* the view configuration for those Locales.
175
173
*/
176
- public void setLocalesToInitialize (Locale [] localesToInitialize ) {
174
+ public void setLocalesToInitialize (Locale ... localesToInitialize ) {
177
175
this .localesToInitialize = localesToInitialize ;
178
176
}
179
177
@@ -198,7 +196,7 @@ protected View loadView(String viewName, Locale locale) throws Exception {
198
196
return factory .getBean (viewName , View .class );
199
197
}
200
198
catch (NoSuchBeanDefinitionException ex ) {
201
- // to allow for ViewResolver chaining
199
+ // Allow for ViewResolver chaining...
202
200
return null ;
203
201
}
204
202
}
0 commit comments