[重大更新] 使用 spring 新特性 HttpServiceClient 替代 Dubbo 降低框架使用难度(半成本 数据权限不好使)

This commit is contained in:
疯狂的狮子Li
2026-03-20 19:56:09 +08:00
parent 9cd198d99d
commit b6d2274b53
127 changed files with 1894 additions and 1496 deletions

View File

@@ -1,6 +1,5 @@
package org.dromara.resource;
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;
@@ -11,7 +10,6 @@ import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
*
* @author Lion Li
*/
@EnableDubbo
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class RuoYiResourceApplication {
public static void main(String[] args) {

View File

@@ -3,7 +3,7 @@ package org.dromara.resource.dubbo;
import cn.hutool.core.convert.Convert;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.http.annotation.RemoteServiceController;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.common.core.utils.StringUtils;
@@ -17,7 +17,6 @@ import org.dromara.resource.domain.SysOssExt;
import org.dromara.resource.domain.bo.SysOssBo;
import org.dromara.resource.domain.vo.SysOssVo;
import org.dromara.resource.service.ISysOssService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@@ -28,9 +27,8 @@ import java.util.List;
* @author Lion Li
*/
@Slf4j
@Service
@RequiredArgsConstructor
@DubboService
@RemoteServiceController
public class RemoteFileServiceImpl implements RemoteFileService {
private final ISysOssService sysOssService;

View File

@@ -2,11 +2,10 @@ package org.dromara.resource.dubbo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.http.annotation.RemoteServiceController;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.mail.utils.MailUtils;
import org.dromara.resource.api.RemoteMailService;
import org.springframework.stereotype.Service;
/**
* 邮件服务
@@ -15,8 +14,7 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@RequiredArgsConstructor
@Service
@DubboService
@RemoteServiceController
public class RemoteMailServiceImpl implements RemoteMailService {
/**

View File

@@ -2,11 +2,10 @@ package org.dromara.resource.dubbo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.http.annotation.RemoteServiceController;
import org.dromara.common.sse.dto.SseMessageDTO;
import org.dromara.common.sse.utils.SseMessageUtils;
import org.dromara.resource.api.RemoteMessageService;
import org.springframework.stereotype.Service;
import java.util.List;
@@ -17,8 +16,7 @@ import java.util.List;
*/
@Slf4j
@RequiredArgsConstructor
@Service
@DubboService
@RemoteServiceController
public class RemoteMessageServiceImpl implements RemoteMessageService {
/**

View File

@@ -2,13 +2,14 @@ package org.dromara.resource.dubbo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.http.annotation.RemoteServiceController;
import org.dromara.resource.api.RemoteSmsService;
import org.dromara.resource.api.domain.RemoteSms;
import org.dromara.resource.api.domain.RemoteSmsBatch;
import org.dromara.resource.api.domain.RemoteSmsDelayBatch;
import org.dromara.sms4j.api.SmsBlend;
import org.dromara.sms4j.api.entity.SmsResponse;
import org.dromara.sms4j.core.factory.SmsFactory;
import org.springframework.stereotype.Service;
import java.util.LinkedHashMap;
import java.util.List;
@@ -20,8 +21,7 @@ import java.util.List;
*/
@Slf4j
@RequiredArgsConstructor
@Service
@DubboService
@RemoteServiceController
public class RemoteSmsServiceImpl implements RemoteSmsService {
/**
@@ -122,6 +122,11 @@ public class RemoteSmsServiceImpl implements RemoteSmsService {
return getRemoteSms(smsResponse);
}
@Override
public RemoteSms messageTextingTemplate(RemoteSmsBatch request) {
return messageTexting(request.phones(), request.templateId(), request.messages());
}
/**
* 异步方法:发送简单文本短信
*
@@ -195,6 +200,11 @@ public class RemoteSmsServiceImpl implements RemoteSmsService {
getSmsBlend().delayMassTexting(phones, templateId, messages, delayedTime);
}
@Override
public void delayMessageTextingTemplate(RemoteSmsDelayBatch request) {
delayMessageTexting(request.phones(), request.templateId(), request.messages(), request.delayedTime());
}
/**
* 加入黑名单
*