change package name,fixes error
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -15,7 +15,7 @@
|
||||
<version>3.5.4</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.ttstd</groupId>
|
||||
<groupId>com.onekeycall</groupId>
|
||||
<artifactId>VideoTablet</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>VideoTablet</name>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet;
|
||||
package com.onekeycall.videotablet;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.config;
|
||||
package com.onekeycall.videotablet.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.config;
|
||||
package com.onekeycall.videotablet.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.config;
|
||||
package com.onekeycall.videotablet.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ttstd.videotablet.controller;
|
||||
package com.onekeycall.videotablet.controller;
|
||||
|
||||
import com.ttstd.videotablet.result.Result;
|
||||
import com.onekeycall.videotablet.result.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.ttstd.videotablet.controller;
|
||||
package com.onekeycall.videotablet.controller;
|
||||
|
||||
import com.ttstd.videotablet.entity.User;
|
||||
import com.ttstd.videotablet.service.UserService;
|
||||
import com.ttstd.videotablet.utils.TextUtils;
|
||||
import com.onekeycall.videotablet.entity.User;
|
||||
import com.onekeycall.videotablet.service.UserService;
|
||||
import com.onekeycall.videotablet.utils.TextUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.ttstd.videotablet.controller;
|
||||
package com.onekeycall.videotablet.controller;
|
||||
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
|
||||
import com.aliyun.tea.TeaException;
|
||||
import com.ttstd.videotablet.result.Result;
|
||||
import com.ttstd.videotablet.sms.SendSms;
|
||||
import com.ttstd.videotablet.utils.TextUtils;
|
||||
import com.onekeycall.videotablet.result.Result;
|
||||
import com.onekeycall.videotablet.sms.SendSms;
|
||||
import com.onekeycall.videotablet.utils.TextUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.ttstd.videotablet.dto;
|
||||
package com.onekeycall.videotablet.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 双Token认证令牌对(AccessToken + RefreshToken)
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.entity;
|
||||
package com.onekeycall.videotablet.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ttstd.videotablet.handler;
|
||||
package com.onekeycall.videotablet.handler;
|
||||
|
||||
import com.ttstd.videotablet.result.Result;
|
||||
import com.onekeycall.videotablet.result.Result;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ttstd.videotablet.repository;
|
||||
package com.onekeycall.videotablet.repository;
|
||||
|
||||
import com.ttstd.videotablet.entity.User;
|
||||
import com.onekeycall.videotablet.entity.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.result;
|
||||
package com.onekeycall.videotablet.result;
|
||||
|
||||
/**
|
||||
* 接口返回工具类
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.result;
|
||||
package com.onekeycall.videotablet.result;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.result;
|
||||
package com.onekeycall.videotablet.result;
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.ttstd.videotablet.service;
|
||||
package com.onekeycall.videotablet.service;
|
||||
|
||||
import com.ttstd.videotablet.entity.User;
|
||||
import com.ttstd.videotablet.repository.UserRepository;
|
||||
import com.onekeycall.videotablet.entity.User;
|
||||
import com.onekeycall.videotablet.repository.UserRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.sms;
|
||||
package com.onekeycall.videotablet.sms;
|
||||
|
||||
// This file is auto-generated, don't edit it. Thanks.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.utils;
|
||||
package com.onekeycall.videotablet.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.ttstd.videotablet.utils;
|
||||
package com.onekeycall.videotablet.utils;
|
||||
|
||||
import com.ttstd.videotablet.dto.TokenPair;
|
||||
import com.onekeycall.videotablet.dto.TokenPair;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -18,9 +18,12 @@ public class JwtUtil {
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
|
||||
@Value("${jwt.secret}") private String secret;
|
||||
@Value("${jwt.access-expire}") private Long accessExpire;
|
||||
@Value("${jwt.refresh-expire}") private Long refreshExpire;
|
||||
@Value("${jwt.secret}")
|
||||
private String secret;
|
||||
@Value("${jwt.access-expire}")
|
||||
private Long accessExpire;
|
||||
@Value("${jwt.refresh-expire}")
|
||||
private Long refreshExpire;
|
||||
|
||||
// 生成双Token(关联设备指纹)
|
||||
public TokenPair generateTokenPair(String username, String deviceId) {
|
||||
@@ -50,7 +53,7 @@ public class JwtUtil {
|
||||
TimeUnit.MILLISECONDS
|
||||
);
|
||||
|
||||
return new TokenPair(accessToken, refreshToken);
|
||||
return new TokenPair(accessToken, refreshToken, accessExpire, refreshExpire, deviceId);
|
||||
}
|
||||
|
||||
// Token解析与校验(略)
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet.utils;
|
||||
package com.onekeycall.videotablet.utils;
|
||||
|
||||
public class TextUtils {
|
||||
public static boolean isEmpty(CharSequence str) {
|
||||
@@ -27,4 +27,9 @@ spring.data.redis.lettuce.shutdown-timeout=100ms
|
||||
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.show-sql=true
|
||||
|
||||
jwt.secret='wPQ1qRFo4YbuA849tmwKnDpQ8891vJBo'
|
||||
# 可选,根据你的需要设置过期时间
|
||||
jwt.access-expire=86400000
|
||||
jwt.refresh-expire=2592000000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ttstd.videotablet;
|
||||
package com.onekeycall.videotablet;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
Reference in New Issue
Block a user