aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src/main')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/configuration/XMPPConfiguration.java11
-rw-r--r--juick-xmpp/src/main/resources/logback.xml13
2 files changed, 24 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);
}
diff --git a/juick-xmpp/src/main/resources/logback.xml b/juick-xmpp/src/main/resources/logback.xml
new file mode 100644
index 00000000..9e3bf16c
--- /dev/null
+++ b/juick-xmpp/src/main/resources/logback.xml
@@ -0,0 +1,13 @@
+<configuration>
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration> \ No newline at end of file