refactor: 'fun set(key: String, value: String, timeout: Long, unit: TimeUnit): Unit' is deprecated. Deprecated in Java.

This commit is contained in:
SOR
2026-08-09 17:55:13 +08:00
parent 091684357d
commit 2912d83b5e
@@ -10,8 +10,8 @@ import org.springframework.data.redis.core.StringRedisTemplate
import org.springframework.security.core.userdetails.User
import org.springframework.security.core.userdetails.UserDetails
import org.springframework.stereotype.Component
import java.time.Duration
import java.util.*
import java.util.concurrent.TimeUnit
@Component
class JwtUtils(
@@ -44,8 +44,7 @@ class JwtUtils(
template.opsForValue().set(
Const.JWT_BLACK_LIST + uuid,
"deleted",
expire,
TimeUnit.MILLISECONDS
Duration.ofMillis(expire)
)
return true
}