diff options
author | 2016-11-15 00:03:59 +0700 | |
---|---|---|
committer | 2016-11-15 09:49:27 +0300 | |
commit | 32a6feb195171e06d60117ad758cc8beb50e5ca3 (patch) | |
tree | 7e3c72fe408861e8d828f181a46816e1b200993f /server-core/src/main/java/com/juick/service/AdsServiceImpl.java | |
parent | 73a2b1d4796ea18ef476f4ca30e2028c828d0ac1 (diff) |
Constructor injectection for service layer
Diffstat (limited to 'server-core/src/main/java/com/juick/service/AdsServiceImpl.java')
-rw-r--r-- | server-core/src/main/java/com/juick/service/AdsServiceImpl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server-core/src/main/java/com/juick/service/AdsServiceImpl.java b/server-core/src/main/java/com/juick/service/AdsServiceImpl.java index aeb2dd85..a6a5c85d 100644 --- a/server-core/src/main/java/com/juick/service/AdsServiceImpl.java +++ b/server-core/src/main/java/com/juick/service/AdsServiceImpl.java @@ -1,8 +1,11 @@ package com.juick.service; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; +import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import javax.inject.Inject; import java.util.List; /** @@ -12,6 +15,11 @@ import java.util.List; @Transactional public class AdsServiceImpl extends BaseJdbcService implements AdsService { + @Inject + public AdsServiceImpl(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate, null); + } + @Transactional(readOnly = true) @Override public int getAdMid(final int uid) { |