aboutsummaryrefslogtreecommitdiff
path: root/server-core/src/main/java/com/juick/service/TagServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'server-core/src/main/java/com/juick/service/TagServiceImpl.java')
-rw-r--r--server-core/src/main/java/com/juick/service/TagServiceImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/server-core/src/main/java/com/juick/service/TagServiceImpl.java b/server-core/src/main/java/com/juick/service/TagServiceImpl.java
index 3aed4b9b..d63159cf 100644
--- a/server-core/src/main/java/com/juick/service/TagServiceImpl.java
+++ b/server-core/src/main/java/com/juick/service/TagServiceImpl.java
@@ -3,10 +3,12 @@ package com.juick.service;
import com.juick.Tag;
import org.apache.commons.lang3.StringEscapeUtils;
import org.springframework.dao.EmptyResultDataAccessException;
+import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.GeneratedKeyHolder;
import org.springframework.jdbc.support.KeyHolder;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
import javax.inject.Inject;
import java.sql.PreparedStatement;
@@ -27,8 +29,14 @@ public class TagServiceImpl extends BaseJdbcService implements TagService {
private static final Pattern TAGS_PATTERN2 = Pattern.compile("^\\*([^ \\r\\n\\t]+)\\s+([\\s\\S]+)");
private static final Pattern TAG_PATTERN = Pattern.compile("\\*([^ \\r\\n\\t]+)");
+ private final MessagesService messagesService;
+
@Inject
- MessagesService messagesService;
+ public TagServiceImpl(JdbcTemplate jdbcTemplate, MessagesService messagesService) {
+ super(jdbcTemplate, null);
+ Assert.notNull(messagesService);
+ this.messagesService = messagesService;
+ }
@Transactional(readOnly = true)
@Override