本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}
示例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();
}