private List<ViewResolver> initViewResolvers(WebApplicationContext wac) { this.viewResolvers = (this.viewResolvers == null) ? Arrays.<ViewResolver>asList(new InternalResourceViewResolver()) : this.viewResolvers; for (Object viewResolver : this.viewResolvers) { if (viewResolver instanceof WebApplicationObjectSupport) { ((WebApplicationObjectSupport) viewResolver).setApplicationContext(wac); } } return this.viewResolvers; }