本文整理匯總了Java中org.thymeleaf.spring4.SpringTemplateEngine.addTemplateResolver方法的典型用法代碼示例。如果您正苦於以下問題:Java SpringTemplateEngine.addTemplateResolver方法的具體用法?Java SpringTemplateEngine.addTemplateResolver怎麽用?Java SpringTemplateEngine.addTemplateResolver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.thymeleaf.spring4.SpringTemplateEngine
的用法示例。
在下文中一共展示了SpringTemplateEngine.addTemplateResolver方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public SpringTemplateEngine templateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setEnableSpringELCompiler(true);
// engine.addTemplateResolver(xmlTemplateResolver());
// engine.addTemplateResolver(emailTemplateResolver());
engine.addTemplateResolver(webTemplateResolver());
engine.addTemplateResolver(mailPreviewTemplateResolver());
engine.addTemplateResolver(yadaTemplateResolver());
// Do this in the subclass
// // http://www.thymeleaf.org/layouts.html
// engine.addDialect(new LayoutDialect()); // thymeleaf-layout-dialect
addExtraDialect(engine); // thymeleaf-SpringSecurity-dialect
addYadaDialect(engine);
return engine;
}
示例2: emailTemplateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public TemplateEngine emailTemplateEngine() {
final SpringTemplateEngine templateEngine = new SpringTemplateEngine();
templateEngine.addTemplateResolver(htmlTemplateResolver());
templateEngine.setTemplateEngineMessageSource(messageSource);
return templateEngine;
}
示例3: 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;
}
示例4: xmlTemplateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
public SpringTemplateEngine xmlTemplateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.addTemplateResolver(xmlTemplateResolver());
// Do this in the subclass
// engine.addDialect(new LayoutDialect()); // thymeleaf-layout-dialect
addExtraDialect(engine); // thymeleaf-SpringSecurity-dialect
addYadaDialect(engine);
return engine;
}