Commit 043c05a083064dbe1a3d74377fa205fc26f68aa8
1 parent
d68ced8d
修复阿里云短信,无法发送的问题
Showing
6 changed files
with
53 additions
and
34 deletions
yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/framework/redis/core/stream/RedisStreamTest.java
| @@ -5,7 +5,7 @@ import cn.iocoder.yudao.adminserver.BaseRedisIntegrationTest; | @@ -5,7 +5,7 @@ import cn.iocoder.yudao.adminserver.BaseRedisIntegrationTest; | ||
| 5 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer; | 5 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer; |
| 6 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer; | 6 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer; |
| 7 | import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage; | 7 | import cn.iocoder.yudao.adminserver.modules.system.mq.message.mail.SysMailSendMessage; |
| 8 | -import cn.iocoder.yudao.adminserver.modules.system.mq.message.sms.SysSmsSendMessage; | 8 | +import cn.iocoder.yudao.coreservice.modules.system.mq.message.sms.SysSmsSendMessage; |
| 9 | import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; | 9 | import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; |
| 10 | import org.junit.jupiter.api.Disabled; | 10 | import org.junit.jupiter.api.Disabled; |
| 11 | import org.junit.jupiter.api.Test; | 11 | import org.junit.jupiter.api.Test; |
yudao-admin-server/src/test-integration/java/cn/iocoder/yudao/adminserver/modules/system/service/sms/SysSmsServiceIntegrationTest.java
| @@ -7,9 +7,9 @@ import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendCon | @@ -7,9 +7,9 @@ import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendCon | ||
| 7 | import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; | 7 | import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; |
| 8 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl; | 8 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl; |
| 9 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl; | 9 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsLogServiceImpl; |
| 10 | -import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsServiceImpl; | ||
| 11 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; | 10 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; |
| 12 | import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; | 11 | import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; |
| 12 | +import cn.iocoder.yudao.coreservice.modules.system.service.sms.impl.SysSmsCoreServiceImpl; | ||
| 13 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | 13 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 14 | import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration; | 14 | import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration; |
| 15 | import org.junit.jupiter.api.Test; | 15 | import org.junit.jupiter.api.Test; |
| @@ -20,13 +20,14 @@ import javax.annotation.Resource; | @@ -20,13 +20,14 @@ import javax.annotation.Resource; | ||
| 20 | import java.util.Map; | 20 | import java.util.Map; |
| 21 | import java.util.concurrent.TimeUnit; | 21 | import java.util.concurrent.TimeUnit; |
| 22 | 22 | ||
| 23 | +// TODO @芋艿:需要迁移 | ||
| 23 | @Import({YudaoSmsAutoConfiguration.class, | 24 | @Import({YudaoSmsAutoConfiguration.class, |
| 24 | - SysSmsChannelServiceImpl.class, SysSmsServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class, | 25 | + SysSmsChannelServiceImpl.class, SysSmsCoreServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class, |
| 25 | SysSmsProducer.class, SysSmsSendConsumer.class}) | 26 | SysSmsProducer.class, SysSmsSendConsumer.class}) |
| 26 | public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest { | 27 | public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest { |
| 27 | 28 | ||
| 28 | @Resource | 29 | @Resource |
| 29 | - private SysSmsServiceImpl smsService; | 30 | + private SysSmsCoreServiceImpl smsService; |
| 30 | @Resource | 31 | @Resource |
| 31 | private SysSmsChannelServiceImpl smsChannelService; | 32 | private SysSmsChannelServiceImpl smsChannelService; |
| 32 | 33 |
yudao-dependencies/pom.xml
| @@ -34,9 +34,9 @@ | @@ -34,9 +34,9 @@ | ||
| 34 | <lock4j.version>2.2.0</lock4j.version> | 34 | <lock4j.version>2.2.0</lock4j.version> |
| 35 | <resilience4j.version>1.7.0</resilience4j.version> | 35 | <resilience4j.version>1.7.0</resilience4j.version> |
| 36 | <!-- 监控相关 --> | 36 | <!-- 监控相关 --> |
| 37 | - <skywalking.version>8.5.0</skywalking.version> | 37 | + <skywalking.version>8.7.0</skywalking.version> |
| 38 | <spring-boot-admin.version>2.3.1</spring-boot-admin.version> | 38 | <spring-boot-admin.version>2.3.1</spring-boot-admin.version> |
| 39 | - <opentracing.version>0.30.0</opentracing.version> | 39 | + <opentracing.version>0.31.0</opentracing.version> |
| 40 | <!-- Test 测试相关 --> | 40 | <!-- Test 测试相关 --> |
| 41 | <podam.version>7.2.6.RELEASE</podam.version> | 41 | <podam.version>7.2.6.RELEASE</podam.version> |
| 42 | <jedis-mock.version>0.1.16</jedis-mock.version> | 42 | <jedis-mock.version>0.1.16</jedis-mock.version> |
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | <screw.version>1.0.5</screw.version> | 49 | <screw.version>1.0.5</screw.version> |
| 50 | <guava.version>30.1.1-jre</guava.version> | 50 | <guava.version>30.1.1-jre</guava.version> |
| 51 | <!-- 三方云服务相关 --> | 51 | <!-- 三方云服务相关 --> |
| 52 | - <aliyun-java-sdk-core.version>4.5.18</aliyun-java-sdk-core.version> | 52 | + <aliyun-java-sdk-core.version>4.5.25</aliyun-java-sdk-core.version> |
| 53 | <aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version> | 53 | <aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version> |
| 54 | <yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version> | 54 | <yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version> |
| 55 | </properties> | 55 | </properties> |
| @@ -257,12 +257,32 @@ | @@ -257,12 +257,32 @@ | ||
| 257 | <groupId>org.apache.skywalking</groupId> | 257 | <groupId>org.apache.skywalking</groupId> |
| 258 | <artifactId>apm-toolkit-opentracing</artifactId> | 258 | <artifactId>apm-toolkit-opentracing</artifactId> |
| 259 | <version>${skywalking.version}</version> | 259 | <version>${skywalking.version}</version> |
| 260 | +<!-- <exclusions>--> | ||
| 261 | +<!-- <exclusion>--> | ||
| 262 | +<!-- <artifactId>opentracing-api</artifactId>--> | ||
| 263 | +<!-- <groupId>io.opentracing</groupId>--> | ||
| 264 | +<!-- </exclusion>--> | ||
| 265 | +<!-- <exclusion>--> | ||
| 266 | +<!-- <artifactId>opentracing-util</artifactId>--> | ||
| 267 | +<!-- <groupId>io.opentracing</groupId>--> | ||
| 268 | +<!-- </exclusion>--> | ||
| 269 | +<!-- </exclusions>--> | ||
| 270 | + </dependency> | ||
| 271 | + <dependency> | ||
| 272 | + <groupId>io.opentracing</groupId> | ||
| 273 | + <artifactId>opentracing-api</artifactId> | ||
| 274 | + <version>${opentracing.version}</version> | ||
| 260 | </dependency> | 275 | </dependency> |
| 261 | <dependency> | 276 | <dependency> |
| 262 | <groupId>io.opentracing</groupId> | 277 | <groupId>io.opentracing</groupId> |
| 263 | <artifactId>opentracing-util</artifactId> | 278 | <artifactId>opentracing-util</artifactId> |
| 264 | <version>${opentracing.version}</version> | 279 | <version>${opentracing.version}</version> |
| 265 | </dependency> | 280 | </dependency> |
| 281 | + <dependency> | ||
| 282 | + <groupId>io.opentracing</groupId> | ||
| 283 | + <artifactId>opentracing-noop</artifactId> | ||
| 284 | + <version>${opentracing.version}</version> | ||
| 285 | + </dependency> | ||
| 266 | 286 | ||
| 267 | <dependency> | 287 | <dependency> |
| 268 | <groupId>de.codecentric</groupId> | 288 | <groupId>de.codecentric</groupId> |
yudao-framework/yudao-spring-boot-starter-monitor/pom.xml
| @@ -42,6 +42,10 @@ | @@ -42,6 +42,10 @@ | ||
| 42 | 42 | ||
| 43 | <!-- 监控相关 --> | 43 | <!-- 监控相关 --> |
| 44 | <dependency> | 44 | <dependency> |
| 45 | + <groupId>io.opentracing</groupId> | ||
| 46 | + <artifactId>opentracing-util</artifactId> | ||
| 47 | + </dependency> | ||
| 48 | + <dependency> | ||
| 45 | <groupId>org.apache.skywalking</groupId> | 49 | <groupId>org.apache.skywalking</groupId> |
| 46 | <artifactId>apm-toolkit-trace</artifactId> | 50 | <artifactId>apm-toolkit-trace</artifactId> |
| 47 | </dependency> | 51 | </dependency> |
| @@ -53,10 +57,6 @@ | @@ -53,10 +57,6 @@ | ||
| 53 | <groupId>org.apache.skywalking</groupId> | 57 | <groupId>org.apache.skywalking</groupId> |
| 54 | <artifactId>apm-toolkit-opentracing</artifactId> | 58 | <artifactId>apm-toolkit-opentracing</artifactId> |
| 55 | </dependency> | 59 | </dependency> |
| 56 | - <dependency> | ||
| 57 | - <groupId>io.opentracing</groupId> | ||
| 58 | - <artifactId>opentracing-util</artifactId> | ||
| 59 | - </dependency> | ||
| 60 | 60 | ||
| 61 | <dependency> | 61 | <dependency> |
| 62 | <groupId>de.codecentric</groupId> | 62 | <groupId>de.codecentric</groupId> |
yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java
| 1 | package cn.iocoder.yudao.framework.tracer.config; | 1 | package cn.iocoder.yudao.framework.tracer.config; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; | ||
| 3 | import cn.iocoder.yudao.framework.tracer.core.aop.BizTraceAspect; | 4 | import cn.iocoder.yudao.framework.tracer.core.aop.BizTraceAspect; |
| 4 | import cn.iocoder.yudao.framework.tracer.core.filter.TraceFilter; | 5 | import cn.iocoder.yudao.framework.tracer.core.filter.TraceFilter; |
| 5 | -import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; | ||
| 6 | -import io.opentracing.Tracer; | ||
| 7 | -import io.opentracing.util.GlobalTracer; | ||
| 8 | -import org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer; | ||
| 9 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | 6 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| 10 | -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
| 11 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | 7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 12 | import org.springframework.boot.context.properties.EnableConfigurationProperties; | 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 13 | import org.springframework.boot.web.servlet.FilterRegistrationBean; | 9 | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| @@ -25,24 +21,25 @@ import org.springframework.context.annotation.Configuration; | @@ -25,24 +21,25 @@ import org.springframework.context.annotation.Configuration; | ||
| 25 | @ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true) | 21 | @ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true) |
| 26 | public class YudaoTracerAutoConfiguration { | 22 | public class YudaoTracerAutoConfiguration { |
| 27 | 23 | ||
| 28 | - @Bean | ||
| 29 | - public TracerProperties bizTracerProperties() { | ||
| 30 | - return new TracerProperties(); | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | - @Bean | ||
| 34 | - public BizTraceAspect bizTracingAop() { | ||
| 35 | - return new BizTraceAspect(tracer()); | ||
| 36 | - } | ||
| 37 | - | ||
| 38 | - @Bean | ||
| 39 | - public Tracer tracer() { | ||
| 40 | - // 创建 SkywalkingTracer 对象 | ||
| 41 | - SkywalkingTracer tracer = new SkywalkingTracer(); | ||
| 42 | - // 设置为 GlobalTracer 的追踪器 | ||
| 43 | - GlobalTracer.register(tracer); | ||
| 44 | - return tracer; | ||
| 45 | - } | 24 | + // TODO @芋艿:重要。目前 opentracing 版本存在冲突,要么保证 skywalking,要么保证阿里云短信 sdk |
| 25 | +// @Bean | ||
| 26 | +// public TracerProperties bizTracerProperties() { | ||
| 27 | +// return new TracerProperties(); | ||
| 28 | +// } | ||
| 29 | +// | ||
| 30 | +// @Bean | ||
| 31 | +// public BizTraceAspect bizTracingAop() { | ||
| 32 | +// return new BizTraceAspect(tracer()); | ||
| 33 | +// } | ||
| 34 | +// | ||
| 35 | +// @Bean | ||
| 36 | +// public Tracer tracer() { | ||
| 37 | +// // 创建 SkywalkingTracer 对象 | ||
| 38 | +// SkywalkingTracer tracer = new SkywalkingTracer(); | ||
| 39 | +// // 设置为 GlobalTracer 的追踪器 | ||
| 40 | +// GlobalTracer.register(tracer); | ||
| 41 | +// return tracer; | ||
| 42 | +// } | ||
| 46 | 43 | ||
| 47 | /** | 44 | /** |
| 48 | * 创建 TraceFilter 过滤器,响应 header 设置 traceId | 45 | * 创建 TraceFilter 过滤器,响应 header 设置 traceId |
更新日志.md
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | * 新增用户前台的手机登录、验证码登录 | 20 | * 新增用户前台的手机登录、验证码登录 |
| 21 | * 修复管理后台的用户头像上传 404 的问题,原因是请求路径不对 | 21 | * 修复管理后台的用户头像上传 404 的问题,原因是请求路径不对 |
| 22 | * 修复用户导入失败的问题,原因是 Lombok 链式与 cglib 读取属性有冲突 | 22 | * 修复用户导入失败的问题,原因是 Lombok 链式与 cglib 读取属性有冲突 |
| 23 | +* 修复阿里云短信发送失败的问题,原因是 Opentracing 依赖的版本太低,调整成 0.31.0 | ||
| 23 | 24 | ||
| 24 | ## [v1.0.0] 2021.05.03 | 25 | ## [v1.0.0] 2021.05.03 |
| 25 | 26 |