refactor: 重构 sa-token-redisson 插件

This commit is contained in:
click33
2025-02-23 04:06:23 +08:00
parent f3cec926c6
commit 6c2de3c99e
16 changed files with 81 additions and 409 deletions

View File

@@ -0,0 +1,13 @@
target/
node_modules/
bin/
.settings/
unpackage/
.classpath
.project
.factorypath
.idea/
.iml

View File

@@ -0,0 +1,42 @@
<?xml version='1.0' encoding='utf-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-plugin</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>jar</packaging>
<name>sa-token-redisson-jackson</name>
<artifactId>sa-token-redisson-spring-boot-starter</artifactId>
<description>sa-token integrate redisson (to jackson)</description>
<dependencies>
<!-- sa-token-spring-boot-starter -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-core</artifactId>
</dependency>
<!-- sa-token-redisson -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-redisson</artifactId>
</dependency>
<!-- Redisson 相关操作API -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2020-2099 sa-token.cc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.dev33.satoken.spring;
import cn.dev33.satoken.dao.SaTokenDao;
import cn.dev33.satoken.dao.SaTokenDaoForRedisson;
import org.redisson.api.RedissonClient;
import org.springframework.context.annotation.Bean;
/**
* 注册 SaTokenDaoForRedisson Bean
*
* @author click33
* @since 1.34.0
*/
public class SaTokenDaoForRedissonBeanRegister {
@Bean
public SaTokenDao getSaTokenDaoForRedisson(RedissonClient redissonClient) {
return new SaTokenDaoForRedisson(redissonClient);
}
}

View File

@@ -0,0 +1 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.spring.SaTokenDaoForRedissonBeanRegister