Java 类org.springframework.web.context.support.WebApplicationObjectSupport 实例源码

项目:spring4-understanding    文件:StandaloneMockMvcBuilder.java   
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;
}
项目:class-guard    文件:StandaloneMockMvcBuilder.java   
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;
    }