aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com
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-core/src/main/java/com
parentc0b9f667e25a9f23ff753c39a0366180a4a758c9 (diff)
logback configurations are copied
Diffstat (limited to 'juick-core/src/main/java/com')
-rw-r--r--juick-core/src/main/java/com/juick/configuration/DataConfiguration.java11
1 files changed, 11 insertions, 0 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();