diff options
author | Vitaly Takmazov | 2017-06-30 10:13:55 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-30 10:22:26 +0300 |
commit | 71adc5f8430fbadbf7b10aa2c43c0cb8dce6ea92 (patch) | |
tree | c0de2a379981b27afb8c356baf99be597a4aaa06 /juick-www | |
parent | c99b9350be030bfbf87829956a182753a81d07a2 (diff) |
Pebble 2.4.0 with characterEncoding workaround
Diffstat (limited to 'juick-www')
-rw-r--r-- | juick-www/build.gradle | 2 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/juick-www/build.gradle b/juick-www/build.gradle index 3a2508a2..00fb5fee 100644 --- a/juick-www/build.gradle +++ b/juick-www/build.gradle @@ -23,7 +23,7 @@ dependencies { compile 'com.github.scribejava:scribejava-apis:4.1.1' compile 'com.github.ooxi:serialized-php-parser:0.5.0' compile 'com.sun.mail:javax.mail:1.5.6' - compile 'com.mitchellbosecke:pebble-spring4:2.3.0' + compile 'com.mitchellbosecke:pebble-spring4:2.4.0' testCompile project(path: ':juick-server-jdbc', configuration: 'testArtifacts') // htmlunit 2.25 isn't compatible with spring-test 4.3.6 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; } } |