本文整理汇总了Java中org.springframework.web.servlet.view.velocity.VelocityView类的典型用法代码示例。如果您正苦于以下问题:Java VelocityView类的具体用法?Java VelocityView怎么用?Java VelocityView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VelocityView类属于org.springframework.web.servlet.view.velocity包,在下文中一共展示了VelocityView类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: build
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
public VelocityView build () {
VelocityView view = new VelocityView ();
super.initialize (view);
view.setCacheTemplate (cacheTemplate);
if (dateToolAttribute != null)
view.setDateToolAttribute (dateToolAttribute);
if (encoding != null)
view.setEncoding (encoding);
if (numberToolAttribute != null)
view.setNumberToolAttribute (numberToolAttribute);
if (toolAttributes != null)
view.setToolAttributes (toolAttributes);
if (velocityEngine != null)
view.setVelocityEngine (velocityEngine);
return view;
}
开发者ID:dfci-cccb,项目名称:mev,代码行数:17,代码来源:VelocityViewBuilder.java
示例2: initApplicationContext
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
@Override
protected void initApplicationContext() {
if (this.toolboxConfigLocation != null) {
if (VelocityView.class.equals(getViewClass())) {
this.logger.info("Using EmbeddedVelocityToolboxView instead of "
+ "default VelocityView due to specified toolboxConfigLocation");
setViewClass(EmbeddedVelocityToolboxView.class);
}
}
super.initApplicationContext();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:EmbeddedVelocityViewResolver.java
示例3: standardViewWithoutToolboxConfig
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
@Test
public void standardViewWithoutToolboxConfig() throws Exception {
ApplicationContext context = loadContext(WithoutToolboxConfig.class);
EmbeddedVelocityViewResolver resolver = context
.getBean(EmbeddedVelocityViewResolver.class);
Object viewClass = ReflectionTestUtils.getField(resolver, "viewClass");
assertThat(viewClass).isEqualTo(VelocityView.class);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:EmbeddedVelocityViewResolverTests.java
示例4: standardViewWithoutToolboxConfig
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
@Test
public void standardViewWithoutToolboxConfig() throws Exception {
ApplicationContext context = loadContext(WithoutToolboxConfig.class);
EmbeddedVelocityViewResolver resolver = context
.getBean(EmbeddedVelocityViewResolver.class);
Object viewClass = ReflectionTestUtils.getField(resolver, "viewClass");
assertEquals(VelocityView.class, viewClass);
}
开发者ID:Nephilim84,项目名称:contestparser,代码行数:9,代码来源:EmbeddedVelocityViewResolverTests.java
示例5: testSetIncorrectViewClass
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
public void testSetIncorrectViewClass() {
try {
new JasperReportsViewResolver().setViewClass(VelocityView.class);
fail("Should not be able to set view class to a class that does not extend AbstractJasperReportsView");
}
catch (IllegalArgumentException ex) {
// success
}
}
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:JasperReportViewResolverTests.java
示例6: setIncorrectViewClass
import org.springframework.web.servlet.view.velocity.VelocityView; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void setIncorrectViewClass() {
// Should not be able to set view class to a class that does not extend
// AbstractJasperReportsView.
new JasperReportsViewResolver().setViewClass(VelocityView.class);
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:7,代码来源:JasperReportViewResolverTests.java
注:本文中的org.springframework.web.servlet.view.velocity.VelocityView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论