Hi,
I'm evaluating Pebble as a potential replacement for standard JSP templates. So far so good, but
pebble.cache=false doesn't seem to disable the cache as described here. The value gets set properly in PebbleAutoConfiguration but it looks like it has no effect. I have to restart my app on every single modification I make to my templates.
Anyone can help me with that?
Thank you!
@SpringBootApplication
public class DemoPebbleApplication {
public static void main(String[] args) {
SpringApplication.run(DemoPebbleApplication.class, args);
}
@Bean
public PebbleEngine pebbleEngine() {
return new PebbleEngine.Builder().cacheActive(false).
build();
}
}
@Configuration
public class PebbleTemplateConfiguration {
@Autowired
TemplateProperties templateProperties;
@Bean
public PebbleEngine pebbleEngine() {
return new PebbleEngine.Builder().cacheActive(templateProperties.isCached()).build();
}
}
@ConfigurationProperties(prefix = "spring.template")
public class TemplateProperties {
private boolean isCached = true;
public boolean isCached() {
return isCached;
}
public void setCached(boolean isCached) {
this.isCached = isCached;
}
}