本文整理匯總了Java中org.thymeleaf.spring4.SpringTemplateEngine.setTemplateResolver方法的典型用法代碼示例。如果您正苦於以下問題:Java SpringTemplateEngine.setTemplateResolver方法的具體用法?Java SpringTemplateEngine.setTemplateResolver怎麽用?Java SpringTemplateEngine.setTemplateResolver使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.thymeleaf.spring4.SpringTemplateEngine
的用法示例。
在下文中一共展示了SpringTemplateEngine.setTemplateResolver方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public SpringTemplateEngine templateEngine(){
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver());
engine.setEnableSpringELCompiler(true);
return engine;
}
示例2: 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;
}
示例3: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public SpringTemplateEngine templateEngine(final ServletContextTemplateResolver templateResolver) {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver);
// engine.setEnableSpringELCompiler(true);
engine.setAdditionalDialects(new HashSet<IDialect>() {{
add(new LayoutDialect());
add(new SpringSecurityDialect());
}});
return engine;
}
示例4: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public TemplateEngine templateEngine() {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setEnableSpringELCompiler(true);
engine.setTemplateResolver(templateResolver());
return engine;
}
示例5: templateEngine
import org.thymeleaf.spring4.SpringTemplateEngine; //導入方法依賴的package包/類
@Bean
public SpringTemplateEngine templateEngine(final ServletContextTemplateResolver templateResolver) {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver);
return engine;
}