aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/SphinxSearchService.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/service/SphinxSearchService.java')
-rw-r--r--src/main/java/com/juick/service/SphinxSearchService.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/SphinxSearchService.java b/src/main/java/com/juick/service/SphinxSearchService.java
index 302f10de..06faafc5 100644
--- a/src/main/java/com/juick/service/SphinxSearchService.java
+++ b/src/main/java/com/juick/service/SphinxSearchService.java
@@ -19,6 +19,7 @@ package com.juick.service;
import com.juick.model.User;
import org.apache.commons.lang3.StringUtils;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@@ -34,6 +35,7 @@ import java.util.stream.Collectors;
*/
@Repository
+@ConditionalOnProperty(name = "spring.sql.init.platform", havingValue = "mysql")
@Transactional(readOnly = true)
public class SphinxSearchService extends BaseJdbcService implements SearchService {
private static final int DEFAULT_MAX_RESULT = 20;