aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-11 01:55:55 +0700
committerGravatar Vitaly Takmazov2016-11-11 17:28:00 +0300
commitc825b607c725b5e0d10d826b65b6a183a81540e7 (patch)
treec46e261ba6565076faf03fabcc61e6d0c33422a5 /juick-xmpp/src/main/java
parentc0b9f667e25a9f23ff753c39a0366180a4a758c9 (diff)
logback configurations are copied
Diffstat (limited to 'juick-xmpp/src/main/java')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
index c4bdd117..13ac2a9d 100644
--- a/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
+++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java
@@ -8,10 +8,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.springframework.beans.factory.config.PlaceholderConfigurerSupport;
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.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.env.Environment;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
@@ -43,6 +45,15 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport {
private ServletContext servletContext;
@Bean
+ public static PlaceholderConfigurerSupport propertySourcesPlaceholderConfigurer() {
+ PlaceholderConfigurerSupport configurer = new PropertySourcesPlaceholderConfigurer();
+
+ configurer.setFileEncoding("utf-8");
+ configurer.setOrder(1);
+ return configurer;
+ }
+
+ @Bean
public Loader templateLoader() {
return new ServletLoader(servletContext);
}