Java Code Examples for org.thymeleaf.spring5.SpringTemplateEngine#setEnableSpringELCompiler()

The following examples show how to use org.thymeleaf.spring5.SpringTemplateEngine#setEnableSpringELCompiler() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    // 建立與設定模版引擎
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 2
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 3
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 4
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 5
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 6
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 7
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    // 建立與設定模版引擎
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    engine.addDialect(new SpringSecurityDialect());
    return engine;
}
 
Example 8
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    // 建立與設定模版引擎
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 9
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    // 建立與設定模版引擎
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 10
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    // 建立與設定模版引擎
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 11
Source File: WebConfig.java    From Spring5Tutorial with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) {
    SpringTemplateEngine engine = new SpringTemplateEngine();
    engine.setEnableSpringELCompiler(true);
    engine.setTemplateResolver(templateResolver);
    return engine;
}
 
Example 12
Source File: ThymeleafConfiguration.java    From graviteeio-access-management with Apache License 2.0 5 votes vote down vote up
@Bean
public SpringTemplateEngine getTemplateEngine() {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setEnableSpringELCompiler(true);

    // set template resolvers
    TemplateResolver overrideTemplateResolver = (TemplateResolver) overrideTemplateResolver();
    overrideTemplateResolver.setTemplateEngine(templateEngine);
    templateEngine.setTemplateResolver(overrideTemplateResolver);
    templateEngine.addTemplateResolver(defaultTemplateResolver());
    return templateEngine;
}
 
Example 13
Source File: WebConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public ISpringTemplateEngine templateEngine() {
  SpringTemplateEngine engine = new SpringTemplateEngine();
  engine.setEnableSpringELCompiler(true);
  engine.setTemplateResolver(templateResolver());
  engine.addDialect(new SpringSecurityDialect());
  return engine;
}