aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/SphinxSearchService.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-17 21:19:46 +0300
committerGravatar Vitaly Takmazov2022-12-17 21:19:46 +0300
commita6e17eb7aa1366a29a1c23b4bd40a3eb253f8ca9 (patch)
tree06a3459016fcb2949fb75086720f3d7fb0f937d4 /src/main/java/com/juick/service/SphinxSearchService.java
parent32f09ccf94c8ee50444dafa7f468c6e53a1d75df (diff)
postgres: search service
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;