mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 17:08:40 +08:00
autoimmit模块于starter模块职能相对冲突,统一合并入starter
This commit is contained in:
parent
528077a358
commit
aa71dcc4d5
14
pom.xml
14
pom.xml
@ -16,7 +16,6 @@
|
||||
<module>sms4j-api</module>
|
||||
<module>sms4j-provider</module>
|
||||
<module>sms4j-core</module>
|
||||
<module>sms4j-autoimmit</module>
|
||||
<module>sms4j-spring-boot-starter</module>
|
||||
<module>sms4j-solon-plugin</module>
|
||||
<module>sms4j-spring-boot-example</module>
|
||||
@ -86,12 +85,6 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j-autoimmit</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!--核心模块-->
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
@ -127,13 +120,6 @@
|
||||
<version>${forest.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!--aop依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- redis 缓存操作 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>sms4j-autoimmit</artifactId>
|
||||
|
||||
<name>sms4j-autoimmit</name>
|
||||
<description>sms4j-autoimmit</description>
|
||||
|
||||
<dependencies>
|
||||
<!--aop依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--配置文件提示-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -1,5 +0,0 @@
|
||||
/**
|
||||
* Spring Boot自动装配配置
|
||||
* @author :Wind
|
||||
*/
|
||||
package org.dromara.sms4j.autoimmit;
|
||||
@ -16,20 +16,27 @@
|
||||
<description>sms4j-spring-boot-starter</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara.sms4j</groupId>
|
||||
<artifactId>sms4j-autoimmit</artifactId>
|
||||
<artifactId>sms4j-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--配置文件提示-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package org.dromara.sms4j.autoimmit.aop;
|
||||
package org.dromara.sms4j.starter.aop;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sms4j.api.smsProxy.RestrictedProcess;
|
||||
import org.dromara.sms4j.autoimmit.utils.RedisUtils;
|
||||
import org.dromara.sms4j.autoimmit.utils.SpringUtil;
|
||||
import org.dromara.sms4j.comm.config.SmsConfig;
|
||||
import org.dromara.sms4j.comm.exception.SmsBlendException;
|
||||
import org.dromara.sms4j.comm.utils.SmsUtil;
|
||||
import org.dromara.sms4j.starter.utils.RedisUtils;
|
||||
import org.dromara.sms4j.starter.utils.SpringUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@ -1,11 +1,7 @@
|
||||
package org.dromara.sms4j.autoimmit.config;
|
||||
package org.dromara.sms4j.starter.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sms4j.api.smsProxy.SmsInvocationHandler;
|
||||
import org.dromara.sms4j.autoimmit.aop.RestrictedProcessImpl;
|
||||
import org.dromara.sms4j.autoimmit.utils.ConfigUtil;
|
||||
import org.dromara.sms4j.autoimmit.utils.RedisUtils;
|
||||
import org.dromara.sms4j.autoimmit.utils.SpringUtil;
|
||||
import org.dromara.sms4j.comm.config.SmsBanner;
|
||||
import org.dromara.sms4j.comm.config.SmsConfig;
|
||||
import org.dromara.sms4j.comm.config.SmsSqlConfig;
|
||||
@ -13,6 +9,10 @@ import org.dromara.sms4j.comm.constant.Constant;
|
||||
import org.dromara.sms4j.comm.delayedTime.DelayedTime;
|
||||
import org.dromara.sms4j.comm.factory.BeanFactory;
|
||||
import org.dromara.sms4j.core.SupplierSqlConfig;
|
||||
import org.dromara.sms4j.starter.aop.RestrictedProcessImpl;
|
||||
import org.dromara.sms4j.starter.utils.ConfigUtil;
|
||||
import org.dromara.sms4j.starter.utils.RedisUtils;
|
||||
import org.dromara.sms4j.starter.utils.SpringUtil;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@ -78,11 +78,6 @@ public class SmsAutowiredConfig {
|
||||
SmsInvocationHandler.setRestrictedProcess(new RestrictedProcessImpl());
|
||||
log.debug("The redis cache is enabled for sms4j");
|
||||
}
|
||||
/* 如果启用了短信限制,则注入AOP组件*/
|
||||
// if (BeanFactory.getSmsConfig().getRestricted()){
|
||||
// springUtil.createBean(AopAdvice.class);
|
||||
// log.debug("SMS restriction is enabled");
|
||||
// }
|
||||
//打印banner
|
||||
if (BeanFactory.getSmsConfig().getIsPrint()){
|
||||
SmsBanner.PrintBanner(Constant.VERSION);
|
||||
@ -1,15 +1,12 @@
|
||||
package org.dromara.sms4j.starter.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.dromara.sms4j.autoimmit.config.SmsAutowiredConfig;
|
||||
import org.dromara.sms4j.autoimmit.utils.SpringUtil;
|
||||
import org.dromara.sms4j.starter.utils.SpringUtil;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
@Data
|
||||
public class SmsMainConfig {
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package org.dromara.sms4j.autoimmit.config;
|
||||
package org.dromara.sms4j.starter.config;
|
||||
|
||||
import org.dromara.sms4j.aliyun.config.AlibabaConfig;
|
||||
import org.dromara.sms4j.cloopen.config.CloopenConfig;
|
||||
@ -1,4 +1,4 @@
|
||||
package org.dromara.sms4j.autoimmit.utils;
|
||||
package org.dromara.sms4j.starter.utils;
|
||||
|
||||
import org.springframework.core.env.Environment;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package org.dromara.sms4j.autoimmit.utils;
|
||||
package org.dromara.sms4j.starter.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -8,11 +8,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
package org.dromara.sms4j.autoimmit.utils;
|
||||
package org.dromara.sms4j.starter.utils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeansException;
|
||||
@ -1,4 +1,6 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.dromara.sms4j.starter.config.SmsMainConfig,\
|
||||
org.dromara.sms4j.autoimmit.config.SmsAutowiredConfig,\
|
||||
org.dromara.sms4j.autoimmit.config.SupplierConfig
|
||||
org.dromara.sms4j.config.SmsAutowiredConfig,\
|
||||
org.dromara.sms4j.config.SupplierConfig,\
|
||||
org.dromara.sms4j.comm.config.SmsConfig,\
|
||||
org.dromara.sms4j.comm.config.SmsSqlConfig
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
org.dromara.sms4j.starter.config.SmsMainConfig
|
||||
org.dromara.sms4j.autoimmit.config.SmsAutowiredConfig
|
||||
org.dromara.sms4j.autoimmit.config.SupplierConfig
|
||||
org.dromara.sms4j.config.SmsAutowiredConfig
|
||||
org.dromara.sms4j.config.SupplierConfig
|
||||
org.dromara.sms4j.comm.config.SmsConfig
|
||||
org.dromara.sms4j.comm.config.SmsSqlConfig
|
||||
Loading…
x
Reference in New Issue
Block a user