mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 08:58:38 +08:00
修改统一版本号,添加springBoot3支持
This commit is contained in:
parent
b16a05e130
commit
8965527f6e
59
pom.xml
59
pom.xml
@ -4,11 +4,11 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<name>sms-aggregation</name>
|
||||
<packaging>pom</packaging>
|
||||
<description>sms_aggregation</description>
|
||||
<url>https://gitee.com/the-wind-is-like-a-song/sms_aggregation</url>
|
||||
<url>https://gitee.com/MR-wind/sms_aggregation</url>
|
||||
|
||||
<modules>
|
||||
<module>sms-aggregation-api</module>
|
||||
@ -42,15 +42,14 @@
|
||||
<!-- 仓库信息 -->
|
||||
<scm>
|
||||
<tag>master</tag>
|
||||
<url>https://gitee.com/the-wind-is-like-a-song/sms_aggregation.git</url>
|
||||
<connection>scm:git:https://gitee.com/the-wind-is-like-a-song/sms_aggregation.git</connection>
|
||||
<developerConnection>scm:git:https://gitee.com/the-wind-is-like-a-song/sms_aggregation.git</developerConnection>
|
||||
<url>https://gitee.com/MR-wind/sms_aggregation.git</url>
|
||||
<connection>scm:git:https://gitee.com/MR-wind/sms_aggregation.git</connection>
|
||||
<developerConnection>scm:git:https://gitee.com/MR-wind/sms_aggregation.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring.boot.version>2.7.10</spring.boot.version>
|
||||
<modules.version>1.0.3</modules.version>
|
||||
<spring.boot.version>3.0.5</spring.boot.version>
|
||||
<revision>1.0.3</revision>
|
||||
<aliyun.version>2.0.23</aliyun.version>
|
||||
<json.version>2.0.15</json.version>
|
||||
<okhttp.version>3.14.9</okhttp.version>
|
||||
@ -79,57 +78,57 @@
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-aliyun</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-tencent</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-unisms</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-yunpian</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-huawei</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-spring-boot-starter</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-autoimmit</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--通用模块-->
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-comm</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--api模块-->
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-api</artifactId>
|
||||
<version>${modules.version}</version>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云短信依赖-->
|
||||
@ -297,6 +296,32 @@
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- version number -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>flatten-maven-plugin</artifactId>
|
||||
<version>1.2.7</version>
|
||||
<configuration>
|
||||
<updatePomFile>true</updatePomFile>
|
||||
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>flatten</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>flatten</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>flatten.clean</id>
|
||||
<phase>clean</phase>
|
||||
<goals>
|
||||
<goal>clean</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-aliyun</artifactId>
|
||||
<name>sms-aggregation-aliyun</name>
|
||||
<description>sms-aggregation-aliyun</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-api</artifactId>
|
||||
<name>sms-aggregation-api</name>
|
||||
<description>sms-aggregation-api</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-autoimmit</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<name>sms-aggregation-autoimmit</name>
|
||||
<description>sms-aggregation-autoimmit</description>
|
||||
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
package kim.wind.sms.autoimmit.config;
|
||||
|
||||
import kim.wind.sms.autoimmit.aop.AopAdvice;
|
||||
import kim.wind.sms.comm.config.SmsBanner;
|
||||
import kim.wind.sms.comm.delayedTime.DelayedTime;
|
||||
import kim.wind.sms.comm.utils.RedisUtils;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@ -13,13 +11,10 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Data
|
||||
public class SmsAutowiredConfig {
|
||||
public void init(){
|
||||
SmsBanner.PrintBanner("V1.0.3");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public class SmsAutowiredConfig {
|
||||
|
||||
@Bean(initMethod = "init")
|
||||
@ConfigurationProperties(prefix = "sms") //指定配置文件注入属性前缀
|
||||
public SmsConfig smsConfig(){
|
||||
return new SmsConfig();
|
||||
@ -62,7 +57,4 @@ public class SmsAutowiredConfig {
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,43 +1,72 @@
|
||||
package kim.wind.sms.autoimmit.config;
|
||||
|
||||
import kim.wind.sms.comm.config.SmsBanner;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SmsConfig {
|
||||
/** 短信服务商*/
|
||||
/**
|
||||
* 短信服务商
|
||||
*/
|
||||
private String supplier;
|
||||
/** 打印banner*/
|
||||
private String isPrint = "true";
|
||||
/**
|
||||
* 打印banner
|
||||
*/
|
||||
private Boolean isPrint = true;
|
||||
|
||||
/** 是否开启短信限制*/
|
||||
/**
|
||||
* 是否开启短信限制
|
||||
*/
|
||||
private String restricted;
|
||||
|
||||
/** 是否使用redis进行缓存*/
|
||||
/**
|
||||
* 是否使用redis进行缓存
|
||||
*/
|
||||
private String redisCache = "false";
|
||||
|
||||
/** 单账号每日最大发送量*/
|
||||
/**
|
||||
* 单账号每日最大发送量
|
||||
*/
|
||||
private Integer accountMax;
|
||||
|
||||
/** 单账号每分钟最大发送*/
|
||||
/**
|
||||
* 单账号每分钟最大发送
|
||||
*/
|
||||
private Integer minuteMax;
|
||||
|
||||
/**核心线程池大小*/
|
||||
/**
|
||||
* 核心线程池大小
|
||||
*/
|
||||
private Integer corePoolSize = 10;
|
||||
|
||||
/** 最大线程数*/
|
||||
/**
|
||||
* 最大线程数
|
||||
*/
|
||||
private Integer maxPoolSize = 30;
|
||||
|
||||
/** 队列容量*/
|
||||
/**
|
||||
* 队列容量
|
||||
*/
|
||||
private Integer queueCapacity = 50;
|
||||
|
||||
/** 活跃时间*/
|
||||
/**
|
||||
* 活跃时间
|
||||
*/
|
||||
private Integer keepAliveSeconds = 60;
|
||||
|
||||
/** 线程名字前缀*/
|
||||
/**
|
||||
* 线程名字前缀
|
||||
*/
|
||||
private String threadNamePrefix = "sms-executor-";
|
||||
|
||||
/** 设置线程池关闭的时候等待所有任务都完成再继续销毁其他的Bean*/
|
||||
/**
|
||||
* 设置线程池关闭的时候等待所有任务都完成再继续销毁其他的Bean
|
||||
*/
|
||||
private Boolean shutdownStrategy = true;
|
||||
|
||||
|
||||
void init(){
|
||||
if (isPrint) {
|
||||
SmsBanner.PrintBanner("v1.0.3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-comm</artifactId>
|
||||
<name>sms-aggregation-comm</name>
|
||||
<description>sms-aggregation-comm</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
package kim.wind.sms.comm.config;
|
||||
|
||||
import kim.wind.sms.comm.constant.Constant;
|
||||
|
||||
public class SmsBanner {
|
||||
|
||||
private static final String banner =
|
||||
" _____ __ __ _____ _____ _____ _____ ______ _____ _______ _____ ____ _ _ \n" +
|
||||
" / ____| | \\/ | / ____| /\\ / ____| / ____| | __ \\ | ____| / ____| /\\ |__ __| |_ _| / __ \\ | \\ | |\n" +
|
||||
@ -13,6 +10,7 @@ public class SmsBanner {
|
||||
" |_____/ |_| |_| |_____/ /_/ \\_\\ \\_____| \\_____| |_| \\_\\ |______| \\_____| /_/ \\_\\ |_| |_____| \\____/ |_| \\_|\n" +
|
||||
" \n" +
|
||||
" ";
|
||||
/** 初始化配置文件时打印banner*/
|
||||
public static void PrintBanner(String version) {
|
||||
System.out.println(banner+version);
|
||||
}
|
||||
|
||||
@ -5,16 +5,16 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-huawei</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<name>sms-aggregation-huawei</name>
|
||||
<description>sms-aggregation-huawei</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@ -5,17 +5,17 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-spring-boot-starter</artifactId>
|
||||
<name>sms-aggregation-spring-boot-starter</name>
|
||||
<description>sms-aggregation-spring-boot-starter</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -36,11 +36,6 @@
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms-aggregation-autoimmit</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@ -18,7 +18,7 @@ public class SmsMainConfig {
|
||||
}
|
||||
|
||||
/** 主要配置注入*/
|
||||
@Bean(initMethod = "init")
|
||||
@Bean
|
||||
public SmsAutowiredConfig smsAutowiredConfig(){
|
||||
return new SmsAutowiredConfig();
|
||||
}
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
kim.wind.sms.starter.config.SmsMainConfig
|
||||
kim.wind.sms.autoimmit.config.SmsAutowiredConfig
|
||||
kim.wind.sms.aliyun.config.AlibabaSmsConfig
|
||||
kim.wind.sms.huawei.config.HuaweiSmsConfig
|
||||
kim.wind.sms.tencent.config.TencentSmsConfig
|
||||
kim.wind.sms.unisms.config.UniSmsConfig
|
||||
kim.wind.sms.yunpian.config.YunPianSmsConfig
|
||||
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-tencent</artifactId>
|
||||
<name>sms-aggregation-tencent</name>
|
||||
<description>sms-aggregation-tencent</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>sms-aggregation-unisms</artifactId>
|
||||
<name>sms-aggregation-unisms</name>
|
||||
<description>sms-aggregation-unisms</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
@ -5,14 +5,14 @@
|
||||
<parent>
|
||||
<groupId>kim.wind</groupId>
|
||||
<artifactId>sms_aggregation</artifactId>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>sms-aggregation-yunpian</artifactId>
|
||||
<name>sms-aggregation-yunpian</name>
|
||||
<description>sms-aggregation-yunpian</description>
|
||||
<version>1.0.3</version>
|
||||
<version>${revision}</version>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user