diff options
author | 2017-11-02 14:20:43 +0300 | |
---|---|---|
committer | 2017-11-02 14:20:43 +0300 | |
commit | a77f62ebf2f1635eec891b21a3ced6d7a4511db6 (patch) | |
tree | cf15119aed3b75ee8f331ed7dee62e32477b2571 /juick-server-jdbc/src/main/java | |
parent | 948b46c07da5a697b611df7a6223818f29f717fd (diff) |
jdbc: fix reading @Value in Configuration
Diffstat (limited to 'juick-server-jdbc/src/main/java')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java | 5 |
1 files changed, 5 insertions, 0 deletions
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(); + } } |