- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Closed
Labels
type: regressionA regression from a previous releaseA regression from a previous release
Milestone
Description
I've found a regression that is caused by #21060, Everything works with version 2.3.0 and it no longer works with version 2.3.1.
If you define the nullValue compiler option in mustache, it no longer works and throw an exception telling that the field is not found:
Caused by: com.samskivert.mustache.MustacheException$Context: No method or field with name 'model.id' on line 7`
        @Bean
	public Mustache.Compiler mustacheCompiler(TemplateLoader mustacheTemplateLoader,
																						Environment environment) {
		return Mustache.compiler()
						.nullValue("")
						.withLoader(mustacheTemplateLoader)
						.withCollector(collector(environment));
	}
	private Mustache.Collector collector(Environment environment) {
		MustacheEnvironmentCollector collector = new MustacheEnvironmentCollector();
		collector.setEnvironment(environment);
		return collector;
	}
I've made a simple project with a test case to demonstrate it. It can be found here. https://github.com/ebussieres/regression-21060
Metadata
Metadata
Assignees
Labels
type: regressionA regression from a previous releaseA regression from a previous release