org.springframework.web.servlet.view
Class BeanNameViewResolver
org.springframework.context.support.ApplicationObjectSupport
|
+--org.springframework.web.context.support.WebApplicationObjectSupport
|
+--org.springframework.web.servlet.view.BeanNameViewResolver
- public class BeanNameViewResolver
- extends WebApplicationObjectSupport
- implements ViewResolver
Simple implementation of ViewResolver that interprets a view name
as bean name in the current application context, i.e. in the XML
file of the executing DispatcherServlet.
This resolver can be handy for small applications, keeping all
definitions ranging from controllers to views are in the same place.
For normal applications, XmlViewResolver will be the better choice,
as it separates the XML bean definitions in a dedicated views file.
View beans should virtually never have references to any other
application beans - such a separation will make this clear.
This ViewResolver does not support internationalization.
Consider ResourceBundleViewResolver if you need to apply
different view resources per locale.
- Author:
- Juergen Hoeller
- Since: 18.06.2003
- See Also: XmlViewResolver, ResourceBundleViewResolver
resolveViewName
public View resolveViewName(String viewName, Locale locale)
throws org.springframework.beans.BeansException