修复阿里云短信,无法发送的问题
parent
d68ced8de4
commit
043c05a083
|
@ -5,7 +5,7 @@ import cn.iocoder.yudao.adminserver.BaseRedisIntegrationTest;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer;
|
import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer;
|
import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage;
|
import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage;
|
import cn.iocoder.yudao.coreservice.modules.system.mq.message.sms.SysSmsSendMessage;
|
||||||
import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils;
|
import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils;
|
||||||
import org.junit.jupiter.api.Disabled;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -7,9 +7,9 @@ import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendCon
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer;
|
import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl;
|
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl;
|
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsServiceImpl;
|
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl;
|
import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl;
|
||||||
import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService;
|
import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService;
|
||||||
|
import cn.iocoder.yudao.coreservice.modules.system.service.sms.impl.SysSmsCoreServiceImpl;
|
||||||
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||||
import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration;
|
import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
@ -20,13 +20,14 @@ import javax.annotation.Resource;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
// TODO @芋艿:需要迁移
|
||||||
@Import({YudaoSmsAutoConfiguration.class,
|
@Import({YudaoSmsAutoConfiguration.class,
|
||||||
SysSmsChannelServiceImpl.class, SysSmsServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class,
|
SysSmsChannelServiceImpl.class, SysSmsCoreServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class,
|
||||||
SysSmsProducer.class, SysSmsSendConsumer.class})
|
SysSmsProducer.class, SysSmsSendConsumer.class})
|
||||||
public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest {
|
public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SysSmsServiceImpl smsService;
|
private SysSmsCoreServiceImpl smsService;
|
||||||
@Resource
|
@Resource
|
||||||
private SysSmsChannelServiceImpl smsChannelService;
|
private SysSmsChannelServiceImpl smsChannelService;
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@
|
||||||
<lock4j.version>2.2.0</lock4j.version>
|
<lock4j.version>2.2.0</lock4j.version>
|
||||||
<resilience4j.version>1.7.0</resilience4j.version>
|
<resilience4j.version>1.7.0</resilience4j.version>
|
||||||
<!-- 监控相关 -->
|
<!-- 监控相关 -->
|
||||||
<skywalking.version>8.5.0</skywalking.version>
|
<skywalking.version>8.7.0</skywalking.version>
|
||||||
<spring-boot-admin.version>2.3.1</spring-boot-admin.version>
|
<spring-boot-admin.version>2.3.1</spring-boot-admin.version>
|
||||||
<opentracing.version>0.30.0</opentracing.version>
|
<opentracing.version>0.31.0</opentracing.version>
|
||||||
<!-- Test 测试相关 -->
|
<!-- Test 测试相关 -->
|
||||||
<podam.version>7.2.6.RELEASE</podam.version>
|
<podam.version>7.2.6.RELEASE</podam.version>
|
||||||
<jedis-mock.version>0.1.16</jedis-mock.version>
|
<jedis-mock.version>0.1.16</jedis-mock.version>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<screw.version>1.0.5</screw.version>
|
<screw.version>1.0.5</screw.version>
|
||||||
<guava.version>30.1.1-jre</guava.version>
|
<guava.version>30.1.1-jre</guava.version>
|
||||||
<!-- 三方云服务相关 -->
|
<!-- 三方云服务相关 -->
|
||||||
<aliyun-java-sdk-core.version>4.5.18</aliyun-java-sdk-core.version>
|
<aliyun-java-sdk-core.version>4.5.25</aliyun-java-sdk-core.version>
|
||||||
<aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version>
|
<aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version>
|
||||||
<yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version>
|
<yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -257,12 +257,32 @@
|
||||||
<groupId>org.apache.skywalking</groupId>
|
<groupId>org.apache.skywalking</groupId>
|
||||||
<artifactId>apm-toolkit-opentracing</artifactId>
|
<artifactId>apm-toolkit-opentracing</artifactId>
|
||||||
<version>${skywalking.version}</version>
|
<version>${skywalking.version}</version>
|
||||||
|
<!-- <exclusions>-->
|
||||||
|
<!-- <exclusion>-->
|
||||||
|
<!-- <artifactId>opentracing-api</artifactId>-->
|
||||||
|
<!-- <groupId>io.opentracing</groupId>-->
|
||||||
|
<!-- </exclusion>-->
|
||||||
|
<!-- <exclusion>-->
|
||||||
|
<!-- <artifactId>opentracing-util</artifactId>-->
|
||||||
|
<!-- <groupId>io.opentracing</groupId>-->
|
||||||
|
<!-- </exclusion>-->
|
||||||
|
<!-- </exclusions>-->
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.opentracing</groupId>
|
||||||
|
<artifactId>opentracing-api</artifactId>
|
||||||
|
<version>${opentracing.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.opentracing</groupId>
|
<groupId>io.opentracing</groupId>
|
||||||
<artifactId>opentracing-util</artifactId>
|
<artifactId>opentracing-util</artifactId>
|
||||||
<version>${opentracing.version}</version>
|
<version>${opentracing.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.opentracing</groupId>
|
||||||
|
<artifactId>opentracing-noop</artifactId>
|
||||||
|
<version>${opentracing.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.codecentric</groupId>
|
<groupId>de.codecentric</groupId>
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 监控相关 -->
|
<!-- 监控相关 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.opentracing</groupId>
|
||||||
|
<artifactId>opentracing-util</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.skywalking</groupId>
|
<groupId>org.apache.skywalking</groupId>
|
||||||
<artifactId>apm-toolkit-trace</artifactId>
|
<artifactId>apm-toolkit-trace</artifactId>
|
||||||
|
@ -53,10 +57,6 @@
|
||||||
<groupId>org.apache.skywalking</groupId>
|
<groupId>org.apache.skywalking</groupId>
|
||||||
<artifactId>apm-toolkit-opentracing</artifactId>
|
<artifactId>apm-toolkit-opentracing</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>io.opentracing</groupId>
|
|
||||||
<artifactId>opentracing-util</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.codecentric</groupId>
|
<groupId>de.codecentric</groupId>
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package cn.iocoder.yudao.framework.tracer.config;
|
package cn.iocoder.yudao.framework.tracer.config;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
|
||||||
import cn.iocoder.yudao.framework.tracer.core.aop.BizTraceAspect;
|
import cn.iocoder.yudao.framework.tracer.core.aop.BizTraceAspect;
|
||||||
import cn.iocoder.yudao.framework.tracer.core.filter.TraceFilter;
|
import cn.iocoder.yudao.framework.tracer.core.filter.TraceFilter;
|
||||||
import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum;
|
|
||||||
import io.opentracing.Tracer;
|
|
||||||
import io.opentracing.util.GlobalTracer;
|
|
||||||
import org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
|
@ -25,24 +21,25 @@ import org.springframework.context.annotation.Configuration;
|
||||||
@ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true)
|
@ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true)
|
||||||
public class YudaoTracerAutoConfiguration {
|
public class YudaoTracerAutoConfiguration {
|
||||||
|
|
||||||
@Bean
|
// TODO @芋艿:重要。目前 opentracing 版本存在冲突,要么保证 skywalking,要么保证阿里云短信 sdk
|
||||||
public TracerProperties bizTracerProperties() {
|
// @Bean
|
||||||
return new TracerProperties();
|
// public TracerProperties bizTracerProperties() {
|
||||||
}
|
// return new TracerProperties();
|
||||||
|
// }
|
||||||
@Bean
|
//
|
||||||
public BizTraceAspect bizTracingAop() {
|
// @Bean
|
||||||
return new BizTraceAspect(tracer());
|
// public BizTraceAspect bizTracingAop() {
|
||||||
}
|
// return new BizTraceAspect(tracer());
|
||||||
|
// }
|
||||||
@Bean
|
//
|
||||||
public Tracer tracer() {
|
// @Bean
|
||||||
// 创建 SkywalkingTracer 对象
|
// public Tracer tracer() {
|
||||||
SkywalkingTracer tracer = new SkywalkingTracer();
|
// // 创建 SkywalkingTracer 对象
|
||||||
// 设置为 GlobalTracer 的追踪器
|
// SkywalkingTracer tracer = new SkywalkingTracer();
|
||||||
GlobalTracer.register(tracer);
|
// // 设置为 GlobalTracer 的追踪器
|
||||||
return tracer;
|
// GlobalTracer.register(tracer);
|
||||||
}
|
// return tracer;
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建 TraceFilter 过滤器,响应 header 设置 traceId
|
* 创建 TraceFilter 过滤器,响应 header 设置 traceId
|
||||||
|
|
1
更新日志.md
1
更新日志.md
|
@ -20,6 +20,7 @@
|
||||||
* 新增用户前台的手机登录、验证码登录
|
* 新增用户前台的手机登录、验证码登录
|
||||||
* 修复管理后台的用户头像上传 404 的问题,原因是请求路径不对
|
* 修复管理后台的用户头像上传 404 的问题,原因是请求路径不对
|
||||||
* 修复用户导入失败的问题,原因是 Lombok 链式与 cglib 读取属性有冲突
|
* 修复用户导入失败的问题,原因是 Lombok 链式与 cglib 读取属性有冲突
|
||||||
|
* 修复阿里云短信发送失败的问题,原因是 Opentracing 依赖的版本太低,调整成 0.31.0
|
||||||
|
|
||||||
## [v1.0.0] 2021.05.03
|
## [v1.0.0] 2021.05.03
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue