mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-09 05:21:25 +08:00
Revert "[重大更新] 使用 spring 新特性 HttpServiceClient 替代 Dubbo 降低框架使用难度(半成本 数据权限不好使)"
This reverts commit b6d2274b
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.dromara.auth;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||
@@ -9,6 +10,7 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableDubbo
|
||||
@SpringBootApplication
|
||||
public class RuoYiAuthApplication {
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import me.zhyd.oauth.model.AuthResponse;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import me.zhyd.oauth.request.AuthRequest;
|
||||
import me.zhyd.oauth.utils.AuthStateUtils;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.RegisterBody;
|
||||
import org.dromara.auth.form.SocialLoginBody;
|
||||
@@ -52,9 +53,13 @@ public class TokenController {
|
||||
private final SysLoginService sysLoginService;
|
||||
private final ScheduledExecutorService scheduledExecutorService;
|
||||
|
||||
@DubboReference
|
||||
private final RemoteConfigService remoteConfigService;
|
||||
@DubboReference
|
||||
private final RemoteClientService remoteClientService;
|
||||
@DubboReference
|
||||
private final RemoteSocialService remoteSocialService;
|
||||
@DubboReference(stub = "true")
|
||||
private final RemoteMessageService remoteMessageService;
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import cn.hutool.http.useragent.UserAgent;
|
||||
import cn.hutool.http.useragent.UserAgentUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.constant.CacheNames;
|
||||
import org.dromara.common.core.constant.Constants;
|
||||
import org.dromara.common.core.utils.MessageUtils;
|
||||
@@ -34,8 +35,10 @@ import java.time.Duration;
|
||||
@Slf4j
|
||||
public class UserActionListener implements SaTokenListener {
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final RemoteMessageService remoteMessageService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteMessageService remoteMessageService;
|
||||
|
||||
/**
|
||||
* 每次登录时触发
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.baomidou.lock.annotation.Lock4j;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.form.RegisterBody;
|
||||
import org.dromara.auth.properties.CaptchaProperties;
|
||||
import org.dromara.auth.properties.UserPasswordProperties;
|
||||
@@ -49,8 +50,10 @@ import java.util.function.Supplier;
|
||||
@Slf4j
|
||||
public class SysLoginService {
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
private final RemoteSocialService remoteSocialService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteSocialService remoteSocialService;
|
||||
|
||||
@Autowired
|
||||
private UserPasswordProperties userPasswordProperties;
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.stp.parameter.SaLoginParameter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.EmailLoginBody;
|
||||
import org.dromara.auth.service.IAuthStrategy;
|
||||
@@ -35,7 +36,8 @@ public class EmailAuthStrategy implements IAuthStrategy {
|
||||
|
||||
private final SysLoginService loginService;
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Override
|
||||
public LoginVo login(String body, RemoteClientVo client) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.stp.parameter.SaLoginParameter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.PasswordLoginBody;
|
||||
import org.dromara.auth.properties.CaptchaProperties;
|
||||
@@ -40,7 +41,8 @@ public class PasswordAuthStrategy implements IAuthStrategy {
|
||||
|
||||
private final SysLoginService loginService;
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Override
|
||||
public LoginVo login(String body, RemoteClientVo client) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.stp.parameter.SaLoginParameter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.SmsLoginBody;
|
||||
import org.dromara.auth.service.IAuthStrategy;
|
||||
@@ -35,7 +36,8 @@ public class SmsAuthStrategy implements IAuthStrategy {
|
||||
|
||||
private final SysLoginService loginService;
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Override
|
||||
public LoginVo login(String body, RemoteClientVo client) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.zhyd.oauth.model.AuthResponse;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.SocialLoginBody;
|
||||
import org.dromara.auth.service.IAuthStrategy;
|
||||
@@ -36,8 +37,10 @@ public class SocialAuthStrategy implements IAuthStrategy {
|
||||
|
||||
private final SocialProperties socialProperties;
|
||||
|
||||
private final RemoteSocialService remoteSocialService;
|
||||
private final RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteSocialService remoteSocialService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 登录-第三方授权登录
|
||||
|
||||
@@ -11,6 +11,7 @@ import me.zhyd.oauth.model.AuthToken;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import me.zhyd.oauth.request.AuthRequest;
|
||||
import me.zhyd.oauth.request.AuthWechatMiniProgramRequest;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.auth.domain.vo.LoginVo;
|
||||
import org.dromara.auth.form.XcxLoginBody;
|
||||
import org.dromara.auth.service.IAuthStrategy;
|
||||
@@ -36,7 +37,8 @@ public class XcxAuthStrategy implements IAuthStrategy {
|
||||
|
||||
private final SysLoginService loginService;
|
||||
|
||||
private final RemoteUserService remoteUserService;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Override
|
||||
public LoginVo login(String body, RemoteClientVo client) {
|
||||
|
||||
Reference in New Issue
Block a user