aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/configuration/DataConfiguration.java')
-rw-r--r--juick-server/src/main/java/com/juick/configuration/DataConfiguration.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java b/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
index 150ced69..535755c2 100644
--- a/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
+++ b/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
@@ -2,10 +2,7 @@ package com.juick.configuration;
import com.juick.service.search.SearchService;
import org.apache.commons.dbcp2.BasicDataSource;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.PropertySource;
+import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
@@ -55,6 +52,7 @@ public class DataConfiguration implements TransactionManagementConfigurer {
}
@Bean
+ @DependsOn("dataSource")
public JdbcTemplate jdbcTemplate() {
return new JdbcTemplate(dataSource());
}