diff options
author | Vitaly Takmazov | 2018-03-28 23:33:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-28 23:33:44 +0300 |
commit | 024533a558e4827564041bdf5040e51370eece80 (patch) | |
tree | 694a7f765ac31d6170b2422060badbe036cd61c2 /juick-server-jdbc | |
parent | f6eb11a23ab645b187c5911ec762a3d6ca58140c (diff) |
server: refactor event listeners
Diffstat (limited to 'juick-server-jdbc')
-rw-r--r-- | juick-server-jdbc/src/main/java/com/juick/service/BaseJdbcService.java | 18 |
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 d0bf0195..496a04ba 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; } } |