Bean instantiation fails when in try to set the expressionhandler to GraalJsExpressionHandler as shown in the JavaConfig code example.
@configuration
public class PugConfig {
@Bean
public SpringTemplateLoader templateLoader() {
SpringTemplateLoader templateLoader = new SpringTemplateLoader();
templateLoader.setTemplateLoaderPath("classpath:/templates");
templateLoader.setEncoding("UTF-8");
templateLoader.setSuffix(".pug");
return templateLoader;
}
@Bean
public PugConfiguration pugConfiguration() {
PugConfiguration configuration = new PugConfiguration();
configuration.setCaching(false);
configuration.setTemplateLoader(templateLoader());
//To use the new GraalJsExpressionHandler add this:
configuration.setExpressionHandler(new GraalJsExpressionHandler());
return configuration;
}
}
Note : Commenting the line which sets expression handler works.
Bean instantiation fails when in try to set the expressionhandler to GraalJsExpressionHandler as shown in the JavaConfig code example.
@configuration
public class PugConfig {
}
Note : Commenting the line which sets expression handler works.