By default, an automatically registered InternalResourceViewResolver ( UrlBasedViewResolver is an abstract superclass).
If you declare your own view transformer, then by default the InternalResourceViewResolver will not be used. You can, if you want, just rewrite it as an explicit bean. If there are several view permissions, they will be consulted until one of them returns the view object. However, because the servlet API is running, InternalResourceViewResolver should always be the last view converter in the chain.
If your controller method returns a View object directly, then there is no need to resolve the view, and the view will be displayed directly. Similarly, if you use @ResponseBody , the resolution of the view is excluded.
skaffman
source share