本文整理汇总了Java中org.thymeleaf.spring4.SpringTemplateEngine.addDialect方法的典型用法代码示例。如果您正苦于以下问题:Java SpringTemplateEngine.addDialect方法的具体用法?Java SpringTemplateEngine.addDialect怎么用?Java SpringTemplateEngine.addDialect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.thymeleaf.spring4.SpringTemplateEngine
的用法示例。
在下文中一共展示了SpringTemplateEngine.addDialect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //导入方法依赖的package包/类
@Bean
@Description("Thymeleaf template engine with Spring integration")
public SpringTemplateEngine templateEngine(final TemplateResolver templateResolver)
throws Exception {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver);
engine.addDialect(new SpringSecurityDialect());
engine.addDialect(new LayoutDialect(new GroupingStrategy()));
engine.afterPropertiesSet();
return engine;
}
示例2: emailTemplateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //导入方法依赖的package包/类
@Bean
public SpringTemplateEngine emailTemplateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setEnableSpringELCompiler(true);
engine.addTemplateResolver(emailTemplateResolver());
// Do this in the subclass
// // http://www.thymeleaf.org/layouts.html
// engine.addDialect(new LayoutDialect()); // thymeleaf-layout-dialect
addExtraDialect(engine); // thymeleaf-SpringSecurity-dialect
engine.addDialect(new YadaDialect(config));
return engine;
}
示例3: addExtraDialect
import org.thymeleaf.spring4.SpringTemplateEngine; //导入方法依赖的package包/类
@Override
protected void addExtraDialect(SpringTemplateEngine engine) {
engine.addDialect(new org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect());
}