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/CrosspostServiceImpl.java | |
parent | 73a2b1d4796ea18ef476f4ca30e2028c828d0ac1 (diff) |
Constructor injectection for service layer
Diffstat (limited to 'server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java')
-rw-r--r-- | server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java b/server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java index 87e307d3..ed1cd676 100644 --- a/server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java +++ b/server-core/src/main/java/com/juick/service/CrosspostServiceImpl.java @@ -2,9 +2,11 @@ package com.juick.service; import com.juick.server.helpers.ApplicationStatus; import org.apache.commons.lang3.tuple.Pair; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; +import javax.inject.Inject; import java.util.List; import java.util.Optional; @@ -15,6 +17,11 @@ import java.util.Optional; @Transactional(readOnly = true) public class CrosspostServiceImpl extends BaseJdbcService implements CrosspostService { + @Inject + public CrosspostServiceImpl(JdbcTemplate jdbcTemplate) { + super(jdbcTemplate, null); + } + @Override public Optional<Pair<String, String>> getTwitterTokens(final int uid) { List<Optional<Pair<String, String>>> list = getJdbcTemplate().query( |