refactor: 重构插件 sa-token-dubbo & sa-token-dubbo3

This commit is contained in:
click33 2025-02-22 18:00:11 +08:00
parent 349213032b
commit d5deb72c9a
9 changed files with 81 additions and 11 deletions

View File

@ -18,25 +18,29 @@
<!-- 所有子模块 -->
<modules>
<!-- 通用插件 -->
<module>sa-token-jackson</module>
<module>sa-token-redis-template</module>
<module>sa-token-redis-template-jdk-serializer</module>
<module>sa-token-redis-jackson</module>
<module>sa-token-fastjson</module>
<module>sa-token-fastjson2</module>
<module>sa-token-hutool-timed-cache</module>
<module>sa-token-thymeleaf</module>
<module>sa-token-freemarker</module>
<!-- SpringBoot 环境插件 -->
<module>sa-token-redis-template</module>
<module>sa-token-redis-template-jdk-serializer</module>
<module>sa-token-redis-jackson</module>
<module>sa-token-alone-redis</module>
<module>sa-token-spring-aop</module>
<module>sa-token-spring-el</module>
<module>sa-token-redisson-jackson</module>
<module>sa-token-redisson-jackson2</module>
<module>sa-token-redisx</module>
<module>sa-token-thymeleaf</module>
<module>sa-token-freemarker</module>
<module>sa-token-sso</module>
<module>sa-token-oauth2</module>
<module>sa-token-quick-login</module>
<module>sa-token-spring-aop</module>
<module>sa-token-spring-el</module>
<module>sa-token-temp-jwt</module>
<module>sa-token-jwt</module>
<module>sa-token-dubbo</module>

View File

@ -0,0 +1,34 @@
/*
* 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.plugin;
import cn.dev33.satoken.SaManager;
import cn.dev33.satoken.context.dubbo.SaTokenSecondContextForDubbo;
/**
* SaToken 插件安装二级上下文 (dubbo )
*
* @author click33
* @since 1.41.0
*/
public class SaTokenPluginForDubbo implements SaTokenPlugin {
@Override
public void setup() {
SaManager.setSaTokenSecondContext(new SaTokenSecondContextForDubbo());
}
}

View File

@ -0,0 +1 @@
cn.dev33.satoken.plugin.SaTokenPluginForDubbo

View File

@ -1 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.context.dubbo.SaTokenSecondContextCreatorForDubbo

View File

@ -1 +0,0 @@
cn.dev33.satoken.context.dubbo.SaTokenSecondContextCreatorForDubbo

View File

@ -0,0 +1,34 @@
/*
* 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.plugin;
import cn.dev33.satoken.SaManager;
import cn.dev33.satoken.context.dubbo3.SaTokenSecondContextForDubbo3;
/**
* SaToken 插件安装二级上下文 (dubbo3 )
*
* @author click33
* @since 1.41.0
*/
public class SaTokenPluginForDubbo3 implements SaTokenPlugin {
@Override
public void setup() {
SaManager.setSaTokenSecondContext(new SaTokenSecondContextForDubbo3());
}
}

View File

@ -0,0 +1 @@
cn.dev33.satoken.plugin.SaTokenPluginForDubbo3

View File

@ -1 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.context.dubbo3.SaTokenSecondContextCreatorForDubbo3

View File

@ -1 +0,0 @@
cn.dev33.satoken.context.dubbo3.SaTokenSecondContextCreatorForDubbo3