Skip to content

Can't set GraalJsExpressionHandler as expression handler #13

@dhruvil-patel

Description

@dhruvil-patel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions