diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java index f829a999..9f68032d 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java +++ b/juick-server/src/main/java/com/juick/server/configuration/WwwAppConfiguration.java @@ -93,8 +93,16 @@ public class WwwAppConfiguration implements WebMvcConfigurer { @Bean public PebbleEngine pebbleEngine() { + boolean devToolsArePresent = false; + try { + Class.forName("org.springframework.boot.devtools.livereload.Connection"); + devToolsArePresent = true; + } catch (ClassNotFoundException e) { + // release mode + } return new PebbleEngine.Builder() .loader(this.templateLoader()) + .cacheActive(!devToolsArePresent) .extension(springExtension()) .extension(new FormatterExtension()) .strictVariables(true) |