From c825b607c725b5e0d10d826b65b6a183a81540e7 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Fri, 11 Nov 2016 01:55:55 +0700 Subject: logback configurations are copied --- juick-api/src/main/webapp/resources/logback.xml | 13 +++++++++++++ .../java/com/juick/configuration/DataConfiguration.java | 11 +++++++++++ juick-core/src/main/resources/logback.xml | 13 ------------- .../components/configuration/CrosspostConfiguration.java | 11 +++++++++++ juick-crosspost/src/main/resources/logback.xml | 13 +++++++++++++ .../configuration/NotificationsConfiguration.java | 11 +++++++++++ juick-notifications/src/main/resources/logback.xml | 13 +++++++++++++ juick-rss/src/main/resources/logback.xml | 13 +++++++++++++ .../com/juick/ws/configuration/WebsocketConfiguration.java | 11 +++++++++++ juick-ws/src/main/resources/logback.xml | 13 +++++++++++++ juick-www/src/main/resources/logback.xml | 13 +++++++++++++ .../juick/components/configuration/XMPPConfiguration.java | 11 +++++++++++ juick-xmpp/src/main/resources/logback.xml | 13 +++++++++++++ 13 files changed, 146 insertions(+), 13 deletions(-) create mode 100644 juick-api/src/main/webapp/resources/logback.xml delete mode 100644 juick-core/src/main/resources/logback.xml create mode 100644 juick-crosspost/src/main/resources/logback.xml create mode 100644 juick-notifications/src/main/resources/logback.xml create mode 100644 juick-rss/src/main/resources/logback.xml create mode 100644 juick-ws/src/main/resources/logback.xml create mode 100644 juick-www/src/main/resources/logback.xml create mode 100644 juick-xmpp/src/main/resources/logback.xml diff --git a/juick-api/src/main/webapp/resources/logback.xml b/juick-api/src/main/webapp/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-api/src/main/webapp/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file diff --git a/juick-core/src/main/java/com/juick/configuration/DataConfiguration.java b/juick-core/src/main/java/com/juick/configuration/DataConfiguration.java index b140b873..62ca0f88 100644 --- a/juick-core/src/main/java/com/juick/configuration/DataConfiguration.java +++ b/juick-core/src/main/java/com/juick/configuration/DataConfiguration.java @@ -1,9 +1,11 @@ package com.juick.configuration; import org.apache.commons.dbcp2.BasicDataSource; +import org.springframework.beans.factory.config.PlaceholderConfigurerSupport; import org.springframework.context.annotation.Bean; 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.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -24,6 +26,15 @@ public class DataConfiguration implements TransactionManagementConfigurer { @Resource private Environment env; + @Bean + public static PlaceholderConfigurerSupport propertySourcesPlaceholderConfigurer() { + PlaceholderConfigurerSupport configurer = new PropertySourcesPlaceholderConfigurer(); + + configurer.setFileEncoding("utf-8"); + configurer.setOrder(0); + return configurer; + } + @Bean public DataSource dataSource() { BasicDataSource dataSource = new BasicDataSource(); diff --git a/juick-core/src/main/resources/logback.xml b/juick-core/src/main/resources/logback.xml deleted file mode 100644 index 9e3bf16c..00000000 --- a/juick-core/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - \ No newline at end of file diff --git a/juick-crosspost/src/main/java/com/juick/components/configuration/CrosspostConfiguration.java b/juick-crosspost/src/main/java/com/juick/components/configuration/CrosspostConfiguration.java index 069037ee..8ae511c4 100644 --- a/juick-crosspost/src/main/java/com/juick/components/configuration/CrosspostConfiguration.java +++ b/juick-crosspost/src/main/java/com/juick/components/configuration/CrosspostConfiguration.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; @@ -42,6 +44,15 @@ public class CrosspostConfiguration extends WebMvcConfigurationSupport { @Inject private JdbcTemplate jdbc; + @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-crosspost/src/main/resources/logback.xml b/juick-crosspost/src/main/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-crosspost/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java index d42549ef..7410648a 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsConfiguration.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; @@ -40,6 +42,15 @@ public class NotificationsConfiguration extends WebMvcConfigurationSupport { @Inject private ServletContext servletContext; + @Bean + public static PlaceholderConfigurerSupport propertySourcesPlaceholderConfigurer() { + PlaceholderConfigurerSupport configurer = new PropertySourcesPlaceholderConfigurer(); + + configurer.setFileEncoding("utf-8"); + configurer.setOrder(1); + return configurer; + } + @Bean RestTemplate rest() { return new RestTemplate(); diff --git a/juick-notifications/src/main/resources/logback.xml b/juick-notifications/src/main/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-notifications/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file diff --git a/juick-rss/src/main/resources/logback.xml b/juick-rss/src/main/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-rss/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index db37edc4..0a2a91fa 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -9,10 +9,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; @@ -48,6 +50,15 @@ public class WebsocketConfiguration extends WebMvcConfigurationSupport implement @Inject private ServletContext servletContext; + @Bean + public static PlaceholderConfigurerSupport propertySourcesPlaceholderConfigurer() { + PlaceholderConfigurerSupport configurer = new PropertySourcesPlaceholderConfigurer(); + + configurer.setFileEncoding("utf-8"); + configurer.setOrder(1); + return configurer; + } + @Bean public WebsocketComponent wsHandler() { return new WebsocketComponent(); diff --git a/juick-ws/src/main/resources/logback.xml b/juick-ws/src/main/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-ws/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file diff --git a/juick-www/src/main/resources/logback.xml b/juick-www/src/main/resources/logback.xml new file mode 100644 index 00000000..9e3bf16c --- /dev/null +++ b/juick-www/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file 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; @@ -42,6 +44,15 @@ public class XMPPConfiguration extends WebMvcConfigurationSupport { @Inject 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 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + \ No newline at end of file -- cgit v1.2.3