diff options
author | Vitaly Takmazov | 2018-03-28 09:04:48 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-28 09:04:48 +0300 |
commit | 3513f3316da8da6a76e572fa6c21b3e1a70a140b (patch) | |
tree | 6be587caa37848cd11ecee0c10a4653c81b9decd /juick-server-jdbc/src | |
parent | 13237626f3956d93a91a94bee6fee6aa86134a06 (diff) |
server: trying to do clean shutdown of DataSource
Diffstat (limited to 'juick-server-jdbc/src')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/configuration/DataConfiguration.java | 2 | ||||
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/configuration/SearchConfiguration.java | 3 |
2 files changed, 2 insertions, 3 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 78c6e1d6..9f59f965 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 @@ -53,7 +53,7 @@ public class DataConfiguration implements TransactionManagementConfigurer { // NOTE: The close() method will be called automatically with default @Bean settings // But Datasource interface has no close() method - @Bean + @Bean(destroyMethod = "") public DataSource dataSource() { BasicDataSource dataSource = new BasicDataSource(); diff --git a/juick-server-jdbc/src/main/java/com/juick/configuration/SearchConfiguration.java b/juick-server-jdbc/src/main/java/com/juick/configuration/SearchConfiguration.java index 70461c91..26b5f888 100644 --- a/juick-server-jdbc/src/main/java/com/juick/configuration/SearchConfiguration.java +++ b/juick-server-jdbc/src/main/java/com/juick/configuration/SearchConfiguration.java @@ -24,7 +24,6 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; -import org.springframework.context.annotation.PropertySource; import org.springframework.core.env.Environment; import javax.annotation.Resource; @@ -39,7 +38,7 @@ public class SearchConfiguration { // NOTE: The close() method will be called automatically with default @Bean settings // But Datasource interface has no close() method - @Bean + @Bean(destroyMethod = "") public BasicDataSource searchDataSource() { BasicDataSource dataSource = new BasicDataSource(); |