本文整理汇总了Java中org.springframework.web.servlet.config.annotation.ViewResolverRegistry类的典型用法代码示例。如果您正苦于以下问题:Java ViewResolverRegistry类的具体用法?Java ViewResolverRegistry怎么用?Java ViewResolverRegistry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ViewResolverRegistry类属于org.springframework.web.servlet.config.annotation包,在下文中一共展示了ViewResolverRegistry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
/**
* Configure ViewResolvers to deliver preferred views.
*/
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
}
示例2: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry)
{
registry.viewResolver(
new ReactViewResolver()
);
}
示例3: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
super.configureViewResolvers(registry);
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setPrefix("/pages/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
}
示例4: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
ScriptTemplateViewResolver viewResolver = new ScriptTemplateViewResolver();
viewResolver.setPrefix("/templates/");
viewResolver.setSuffix(".js");
registry.viewResolver(viewResolver);
registry.scriptTemplate();
super.configureViewResolvers(registry);
}
示例5: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
MappingJackson2JsonView mappingJackson2JsonView = new MappingJackson2JsonView();
mappingJackson2JsonView.setObjectMapper(objectMapper);
registry.enableContentNegotiation(true, mappingJackson2JsonView);
registry.viewResolver(viewResolver);
}
示例6: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
super.configureViewResolvers(registry);
}
示例7: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry
.tiles();
// .prefix("WEB-INF/views")
// .suffix(".jspx");
}
示例8: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
FastJsonJsonView fastJsonJsonView = new FastJsonJsonView();
registry.enableContentNegotiation(fastJsonJsonView);
}
示例9: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry)
{
registry.viewResolver(getViewResolver());
}
示例10: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.tiles();
}
示例11: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.jsp("", "");
}
示例12: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.viewResolver(handlebars());
}
示例13: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.viewResolver(new MustacheViewResolver());
}
示例14: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
registry.scriptTemplate().prefix("/static/templates/").suffix(".html");
}
示例15: configureViewResolvers
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; //导入依赖的package包/类
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
TilesViewResolver viewResolver = new TilesViewResolver();
viewResolver.setViewClass(TilesView.class);
registry.viewResolver(viewResolver);
}