• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java VelocityEngineFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.ui.velocity.VelocityEngineFactory的典型用法代码示例。如果您正苦于以下问题:Java VelocityEngineFactory类的具体用法?Java VelocityEngineFactory怎么用?Java VelocityEngineFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



VelocityEngineFactory类属于org.springframework.ui.velocity包,在下文中一共展示了VelocityEngineFactory类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: applyProperties

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
private void applyProperties(VelocityEngineFactory factory) {
		factory.setResourceLoaderPath("/WEB-INF/velocity/");
		factory.setPreferFileSystemAccess(false);
		Properties velocityProperties = new Properties();
//		velocityProperties.put("velocimacro.permissions.allow.inline", "true");
//		velocityProperties.put("velocimacro.permissions.allow.inline.to.replace.global", "true");
//		velocityProperties.put("velocimacro.permissions.allow.inline.local.scope", "true");
//		velocityProperties.put("input.encoding", "UTF-8");
//		velocityProperties.put("output.encoding", "UTF-8");
//		velocityProperties.put("resource.loader", "webapp, class");
//		velocityProperties.put("class.resource.loader.description", "Velocity Classpath Resource Loader");
//		velocityProperties.put("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader ");
//		velocityProperties.put("webapp.resource.loader.class", "org.apache.velocity.tools.view.WebappResourceLoader");
//		velocityProperties.put("webapp.resource.loader.path", "/WEB-INF/velocity/");
//		velocityProperties.put("webapp.resource.loader.cache", "true");
//		velocityProperties.put("webapp.resource.loader.cache", "false");
		factory.setVelocityProperties(velocityProperties);
	}
 
开发者ID:gleb619,项目名称:hotel_shop,代码行数:19,代码来源:VelocityConfig.java


示例2: BaseSamlProfileSamlResponseBuilder

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
public BaseSamlProfileSamlResponseBuilder(final OpenSamlConfigBean openSamlConfigBean,
                                          final BaseSamlObjectSigner samlObjectSigner,
                                          final VelocityEngineFactory velocityEngineFactory,
                                          final SamlProfileObjectBuilder<Assertion> samlProfileSamlAssertionBuilder,
                                          final SamlObjectEncrypter samlObjectEncrypter) {
    super(openSamlConfigBean);
    this.samlObjectSigner = samlObjectSigner;
    this.velocityEngineFactory = velocityEngineFactory;
    this.samlProfileSamlAssertionBuilder = samlProfileSamlAssertionBuilder;
    this.samlObjectEncrypter = samlObjectEncrypter;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:12,代码来源:BaseSamlProfileSamlResponseBuilder.java


示例3: SamlProfileSamlSoap11ResponseBuilder

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
public SamlProfileSamlSoap11ResponseBuilder(
        final OpenSamlConfigBean openSamlConfigBean,
        final BaseSamlObjectSigner samlObjectSigner,
        final VelocityEngineFactory velocityEngineFactory,
        final SamlProfileObjectBuilder<Assertion> samlProfileSamlAssertionBuilder,
        final SamlProfileObjectBuilder<? extends SAMLObject> saml2ResponseBuilder,
        final SamlObjectEncrypter samlObjectEncrypter) {
    super(openSamlConfigBean, samlObjectSigner, velocityEngineFactory, samlProfileSamlAssertionBuilder, samlObjectEncrypter);
    this.saml2ResponseBuilder = saml2ResponseBuilder;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:11,代码来源:SamlProfileSamlSoap11ResponseBuilder.java


示例4: SamlProfileSaml2ResponseBuilder

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
public SamlProfileSaml2ResponseBuilder(final OpenSamlConfigBean openSamlConfigBean,
                                       final BaseSamlObjectSigner samlObjectSigner,
                                       final VelocityEngineFactory velocityEngineFactory,
                                       final SamlProfileObjectBuilder<Assertion> samlProfileSamlAssertionBuilder,
                                       final SamlObjectEncrypter samlObjectEncrypter) {
    super(openSamlConfigBean, samlObjectSigner, velocityEngineFactory, samlProfileSamlAssertionBuilder, samlObjectEncrypter);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:8,代码来源:SamlProfileSaml2ResponseBuilder.java


示例5: SamlProfileSamlSoap11FaultResponseBuilder

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
public SamlProfileSamlSoap11FaultResponseBuilder(final OpenSamlConfigBean openSamlConfigBean,
                                                 final BaseSamlObjectSigner samlObjectSigner,
                                                 final VelocityEngineFactory velocityEngineFactory,
                                                 final SamlProfileObjectBuilder<Assertion> samlProfileSamlAssertionBuilder,
                                                 final SamlProfileObjectBuilder<? extends SAMLObject> saml2ResponseBuilder,
                                                 final SamlObjectEncrypter samlObjectEncrypter) {
    super(openSamlConfigBean, samlObjectSigner, velocityEngineFactory,
            samlProfileSamlAssertionBuilder, saml2ResponseBuilder, samlObjectEncrypter);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:10,代码来源:SamlProfileSamlSoap11FaultResponseBuilder.java


示例6: applyProperties

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
protected void applyProperties(VelocityEngineFactory factory) {
    factory.setResourceLoaderPath(this.properties.getResourceLoaderPath());
    factory.setPreferFileSystemAccess(this.properties.isPreferFileSystemAccess());
    Properties velocityProperties = new Properties();
    velocityProperties.setProperty("input.encoding",
            this.properties.getCharsetName());
    velocityProperties.putAll(this.properties.getProperties());
    factory.setVelocityProperties(velocityProperties);
}
 
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:10,代码来源:VelocityAutoConfiguration.java


示例7: getVelocityEngine

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
@Bean
public VelocityEngine getVelocityEngine() throws VelocityException, IOException {
    VelocityEngineFactory factory = new VelocityEngineFactory();
    Properties props = new Properties();
    props.put("resource.loader", "class");
    props.put("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
    factory.setVelocityProperties(props);
    return factory.createVelocityEngine();
}
 
开发者ID:egch,项目名称:sushi-bar-BE,代码行数:10,代码来源:ApplicationConfiguration.java


示例8: applyProperties

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
protected void applyProperties(VelocityEngineFactory factory) {
	factory.setResourceLoaderPath(this.properties.getResourceLoaderPath());
	factory.setPreferFileSystemAccess(this.properties.isPreferFileSystemAccess());
	Properties velocityProperties = new Properties();
	velocityProperties.setProperty("input.encoding",
			this.properties.getCharsetName());
	velocityProperties.putAll(this.properties.getProperties());
	factory.setVelocityProperties(velocityProperties);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:VelocityAutoConfiguration.java


示例9: name

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
@Bean @Scope("singleton")	// the method name (mockMessageService) becomes the bean "name"
VelocityEngineFactory velocityEngine() {
	Properties velocityProps = new Properties();
	velocityProps.put("resource.loader","class");
       velocityProps.put("class.resource.loader.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
	
	VelocityEngineFactory outVelocityEngineFactory = new VelocityEngineFactoryBean();
	outVelocityEngineFactory.setVelocityProperties(velocityProps);
	return outVelocityEngineFactory;
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:11,代码来源:GuiceSpringTest.java


示例10: configure

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
@Override
protected void configure() {
	R01F.initSystemEnv();
	
	bind(MailManager.class).toInstance(new MailManager());
	
	bind(JavaMailSender.class).toInstance(GMailSMTPMailSender.create("futuretelematics",
								   								     "qewsvvedftyinsgm"));
	bind(MailMessage.class).toInstance(new SimpleMailMessage());
	
	bind(VelocityEngine.class).toProvider(new Provider<VelocityEngine>() {
													@Override
													public VelocityEngine get() {
														Properties velocityProps = new Properties();
														velocityProps.put("resource.loader","class");
												        velocityProps.put("class.resource.loader.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
														
														VelocityEngineFactory velocityEngineFactory = new VelocityEngineFactoryBean();
														velocityEngineFactory.setVelocityProperties(velocityProps);
														VelocityEngine outVelocityEngine = null;
														try  {
															outVelocityEngine = velocityEngineFactory.createVelocityEngine();
														} catch(IOException ioEx) {
															ioEx.printStackTrace(System.out);
														}
														return outVelocityEngine;
													}
										  })
							  .in(Singleton.class);
}
 
开发者ID:opendata-euskadi,项目名称:r01fb,代码行数:31,代码来源:GuiceSpringTest.java


示例11: velocityEngine

import org.springframework.ui.velocity.VelocityEngineFactory; //导入依赖的package包/类
@Bean
public VelocityEngine velocityEngine() throws VelocityException,
		IOException {
	VelocityEngineFactory factory = new VelocityEngineFactory();
	Properties props = new Properties();
	props.put("resource.loader", "class");
	props.put("class.resource.loader.class",
			"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
	factory.setVelocityProperties(props);
	return factory.createVelocityEngine();
}
 
开发者ID:logsniffer,项目名称:logsniffer,代码行数:12,代码来源:MailAppConfig.java



注:本文中的org.springframework.ui.velocity.VelocityEngineFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Transactional类代码示例发布时间:2022-05-22
下一篇:
Java HftpFileSystem类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap