mirror of
https://github.com/201206030/novel-cloud.git
synced 2025-06-24 14:06:39 +00:00
搜索服务完成
This commit is contained in:
@ -116,4 +116,6 @@
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
|
||||
</project>
|
@ -12,7 +12,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* @author xxy
|
||||
*/
|
||||
@ConditionalOnProperty(prefix = "cache", name = "type", havingValue = "redis")
|
||||
@ConditionalOnProperty(prefix = "spring.redis", name = "host", matchIfMissing = false)
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class RedisServiceImpl implements CacheService {
|
||||
|
@ -37,7 +37,7 @@ public enum ResponseStatus {
|
||||
/**
|
||||
* 用户相关错误
|
||||
* */
|
||||
NO_LOGIN(1001, "未登录或登陆失效!"),
|
||||
NO_LOGIN(1001, "未登录或登陆失效!"),
|
||||
VEL_CODE_ERROR(1002, "验证码错误!"),
|
||||
USERNAME_EXIST(1003,"该手机号已注册!"),
|
||||
USERNAME_PASS_ERROR(1004,"手机号或密码错误!"),
|
||||
@ -58,13 +58,16 @@ public enum ResponseStatus {
|
||||
, BOOKNAME_EXISTS(4003,"已发布过同名小说!")
|
||||
|
||||
,
|
||||
/**
|
||||
* 搜索引擎相关错误
|
||||
* */
|
||||
ES_SEARCH_FAIL(9001,"密码错误!"),
|
||||
|
||||
|
||||
/**
|
||||
* 其他通用错误
|
||||
* */
|
||||
PASSWORD_ERROR(88001,"密码错误!");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
|
@ -8,6 +8,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
@ -18,6 +19,7 @@ import java.util.Map;
|
||||
* @author 11797
|
||||
*/
|
||||
@Component
|
||||
@ConditionalOnProperty(prefix = "jwt", name = "secret")
|
||||
@Slf4j
|
||||
public class JwtTokenUtil {
|
||||
|
||||
|
@ -14,9 +14,7 @@ mybatis:
|
||||
logging:
|
||||
config: classpath:logback-boot.xml
|
||||
|
||||
jwt:
|
||||
secret: novel!1025
|
||||
expiration: 604800
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user