aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-06-30 10:13:55 +0300
committerGravatar Vitaly Takmazov2017-06-30 10:22:26 +0300
commit71adc5f8430fbadbf7b10aa2c43c0cb8dce6ea92 (patch)
treec0de2a379981b27afb8c356baf99be597a4aaa06 /juick-www/src/main/java/com/juick/www
parentc99b9350be030bfbf87829956a182753a81d07a2 (diff)
Pebble 2.4.0 with characterEncoding workaround
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
index d7e5c72e..beba1597 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
@@ -6,14 +6,12 @@ import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.spring4.PebbleViewResolver;
import com.mitchellbosecke.pebble.spring4.extension.SpringExtension;
+import org.apache.commons.codec.CharEncoding;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
-import org.springframework.core.env.Environment;
import org.springframework.http.CacheControl;
-import org.springframework.web.multipart.MultipartResolver;
-import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@@ -88,6 +86,7 @@ public class WwwServletConfiguration extends WebMvcConfigurationSupport {
viewResolver.setPrefix("/WEB-INF/");
viewResolver.setSuffix(".html");
viewResolver.setPebbleEngine(pebbleEngine());
+ viewResolver.setCharacterEncoding(CharEncoding.UTF_8);
return viewResolver;
}
}