aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-core/src/main')
-rw-r--r--juick-core/src/main/java/com/juick/configuration/DataConfiguration.java11
-rw-r--r--juick-core/src/main/resources/logback.xml13
2 files changed, 11 insertions, 13 deletions
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;
@@ -25,6 +27,15 @@ public class DataConfiguration implements TransactionManagementConfigurer {
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 @@
-<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