From a77f62ebf2f1635eec891b21a3ced6d7a4511db6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 2 Nov 2017 14:20:43 +0300 Subject: jdbc: fix reading @Value in Configuration --- .../src/main/java/com/juick/configuration/DataConfiguration.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'juick-server-jdbc/src') diff --git a/juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java b/juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java index 6f028fc6..27e60e9b 100644 --- a/juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java +++ b/juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java @@ -21,6 +21,7 @@ import com.juick.service.search.SearchService; import org.apache.commons.dbcp2.BasicDataSource; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.*; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; @@ -97,4 +98,8 @@ public class DataConfiguration implements TransactionManagementConfigurer { } }; } + @Bean + public static PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } } -- cgit v1.2.3