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 | 5 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.mail.SysMailSendConsumer; |
| 6 | 6 | import cn.iocoder.yudao.adminserver.modules.system.mq.consumer.sms.SysSmsSendConsumer; |
| 7 | 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 | 9 | import cn.iocoder.yudao.framework.mq.core.util.RedisMessageUtils; |
| 10 | 10 | import org.junit.jupiter.api.Disabled; |
| 11 | 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 | 7 | import cn.iocoder.yudao.adminserver.modules.system.mq.producer.sms.SysSmsProducer; |
| 8 | 8 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsChannelServiceImpl; |
| 9 | 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 | 10 | import cn.iocoder.yudao.adminserver.modules.system.service.sms.impl.SysSmsTemplateServiceImpl; |
| 12 | 11 | import cn.iocoder.yudao.adminserver.modules.system.service.user.SysUserService; |
| 12 | +import cn.iocoder.yudao.coreservice.modules.system.service.sms.impl.SysSmsCoreServiceImpl; | |
| 13 | 13 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 14 | 14 | import cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration; |
| 15 | 15 | import org.junit.jupiter.api.Test; |
| ... | ... | @@ -20,13 +20,14 @@ import javax.annotation.Resource; |
| 20 | 20 | import java.util.Map; |
| 21 | 21 | import java.util.concurrent.TimeUnit; |
| 22 | 22 | |
| 23 | +// TODO @芋艿:需要迁移 | |
| 23 | 24 | @Import({YudaoSmsAutoConfiguration.class, |
| 24 | - SysSmsChannelServiceImpl.class, SysSmsServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class, | |
| 25 | + SysSmsChannelServiceImpl.class, SysSmsCoreServiceImpl.class, SysSmsTemplateServiceImpl.class, SysSmsLogServiceImpl.class, | |
| 25 | 26 | SysSmsProducer.class, SysSmsSendConsumer.class}) |
| 26 | 27 | public class SysSmsServiceIntegrationTest extends BaseDbAndRedisIntegrationTest { |
| 27 | 28 | |
| 28 | 29 | @Resource |
| 29 | - private SysSmsServiceImpl smsService; | |
| 30 | + private SysSmsCoreServiceImpl smsService; | |
| 30 | 31 | @Resource |
| 31 | 32 | private SysSmsChannelServiceImpl smsChannelService; |
| 32 | 33 | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -34,9 +34,9 @@ |
| 34 | 34 | <lock4j.version>2.2.0</lock4j.version> |
| 35 | 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 | 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 | 40 | <!-- Test 测试相关 --> |
| 41 | 41 | <podam.version>7.2.6.RELEASE</podam.version> |
| 42 | 42 | <jedis-mock.version>0.1.16</jedis-mock.version> |
| ... | ... | @@ -49,7 +49,7 @@ |
| 49 | 49 | <screw.version>1.0.5</screw.version> |
| 50 | 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 | 53 | <aliyun-java-sdk-dysmsapi.version>2.1.0</aliyun-java-sdk-dysmsapi.version> |
| 54 | 54 | <yunpian-java-sdk.version>1.2.7</yunpian-java-sdk.version> |
| 55 | 55 | </properties> |
| ... | ... | @@ -257,12 +257,32 @@ |
| 257 | 257 | <groupId>org.apache.skywalking</groupId> |
| 258 | 258 | <artifactId>apm-toolkit-opentracing</artifactId> |
| 259 | 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 | 275 | </dependency> |
| 261 | 276 | <dependency> |
| 262 | 277 | <groupId>io.opentracing</groupId> |
| 263 | 278 | <artifactId>opentracing-util</artifactId> |
| 264 | 279 | <version>${opentracing.version}</version> |
| 265 | 280 | </dependency> |
| 281 | + <dependency> | |
| 282 | + <groupId>io.opentracing</groupId> | |
| 283 | + <artifactId>opentracing-noop</artifactId> | |
| 284 | + <version>${opentracing.version}</version> | |
| 285 | + </dependency> | |
| 266 | 286 | |
| 267 | 287 | <dependency> |
| 268 | 288 | <groupId>de.codecentric</groupId> | ... | ... |
yudao-framework/yudao-spring-boot-starter-monitor/pom.xml
| ... | ... | @@ -42,6 +42,10 @@ |
| 42 | 42 | |
| 43 | 43 | <!-- 监控相关 --> |
| 44 | 44 | <dependency> |
| 45 | + <groupId>io.opentracing</groupId> | |
| 46 | + <artifactId>opentracing-util</artifactId> | |
| 47 | + </dependency> | |
| 48 | + <dependency> | |
| 45 | 49 | <groupId>org.apache.skywalking</groupId> |
| 46 | 50 | <artifactId>apm-toolkit-trace</artifactId> |
| 47 | 51 | </dependency> |
| ... | ... | @@ -53,10 +57,6 @@ |
| 53 | 57 | <groupId>org.apache.skywalking</groupId> |
| 54 | 58 | <artifactId>apm-toolkit-opentracing</artifactId> |
| 55 | 59 | </dependency> |
| 56 | - <dependency> | |
| 57 | - <groupId>io.opentracing</groupId> | |
| 58 | - <artifactId>opentracing-util</artifactId> | |
| 59 | - </dependency> | |
| 60 | 60 | |
| 61 | 61 | <dependency> |
| 62 | 62 | <groupId>de.codecentric</groupId> | ... | ... |
yudao-framework/yudao-spring-boot-starter-monitor/src/main/java/cn/iocoder/yudao/framework/tracer/config/YudaoTracerAutoConfiguration.java
| 1 | 1 | package cn.iocoder.yudao.framework.tracer.config; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.WebFilterOrderEnum; | |
| 3 | 4 | import cn.iocoder.yudao.framework.tracer.core.aop.BizTraceAspect; |
| 4 | 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 | 6 | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| 10 | -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| 11 | 7 | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| 12 | 8 | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| 13 | 9 | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| ... | ... | @@ -25,24 +21,25 @@ import org.springframework.context.annotation.Configuration; |
| 25 | 21 | @ConditionalOnProperty(prefix = "yudao.tracer", value = "enable", matchIfMissing = true) |
| 26 | 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 | 45 | * 创建 TraceFilter 过滤器,响应 header 设置 traceId | ... | ... |