aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/main/java/com/juick')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java b/juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java
index d0bf01950..496a04ba6 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java
@@ -18,20 +18,24 @@
package com.juick.service;
import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport;
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
-import javax.annotation.PostConstruct;
import javax.inject.Inject;
-import javax.sql.DataSource;
/**
* Created by aalexeev on 11/13/16.
*/
-public class BaseJdbcService extends NamedParameterJdbcDaoSupport {
+public class BaseJdbcService {
@Inject
JdbcTemplate jdbcTemplate;
- @PostConstruct
- public void init() {
- setJdbcTemplate(jdbcTemplate);
+ @Inject
+ NamedParameterJdbcTemplate namedParameterJdbcTemplate;
+
+ public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate() {
+ return namedParameterJdbcTemplate;
+ }
+
+ public JdbcTemplate getJdbcTemplate() {
+ return jdbcTemplate;
}
}