Commit 374ca8aa by fengshuonan

增加邮件发送和短信发送

parent dcab126d
......@@ -31,7 +31,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@ConditionalOnProperty(prefix = "guns.muti-datasource", name = "open", havingValue = "false", matchIfMissing = true)
@EnableTransactionManagement(proxyTargetClass = true)
@MapperScan(basePackages = {"cn.stylefeng.guns.sys.modular.*.mapper", "cn.stylefeng.guns.generator.modular.mapper", "cn.stylefeng.guns.modular.*.mapper"})
@MapperScan(basePackages = {"cn.stylefeng.guns.sys.modular.*.mapper", "cn.stylefeng.guns.generator.modular.mapper", "cn.stylefeng.guns.modular.*.mapper","cn.stylefeng.guns.sms.modular.mapper"})
public class SingleDataSourceConfig {
}
......
......@@ -24,6 +24,20 @@
<version>1.0.0</version>
</dependency>
<!-- 短信发送 -->
<dependency>
<groupId>cn.stylefeng</groupId>
<artifactId>guns-base-sms</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 邮件发送 -->
<dependency>
<groupId>cn.stylefeng</groupId>
<artifactId>guns-base-email</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 最新代码生成模块 -->
<dependency>
<groupId>cn.stylefeng</groupId>
......
......@@ -38,6 +38,13 @@ spring:
filters: wall,mergeStat
data-source-name: gunsdb
# 邮件发送配置(改为自己的账号和密码)
mail:
host: smtp.qq.com
port: 587
username: sn93@qq.com
password: xxxpassword
# 多数据源情况的配置
guns:
muti-datasource:
......@@ -47,3 +54,14 @@ guns:
username: root
password: root
data-source-name: otherdb
# 阿里云短信发送配置
aliyun:
sms:
accessKeyId: xxxkey
accessKeySecret: xxxSecret
signName: mySignName
# 邮件发送(改为自己的账号)
mail:
from: sn93@qq.com
......@@ -38,6 +38,13 @@ spring:
filters: wall,mergeStat
data-source-name: gunsdb
# 邮件发送配置(改为自己的账号和密码)
mail:
host: smtp.qq.com
port: 587
username: sn93@qq.com
password: xxxpassword
# 多数据源情况的配置
guns:
muti-datasource:
......@@ -47,3 +54,14 @@ guns:
username: root
password: root
data-source-name: otherdb
# 阿里云短信发送配置
aliyun:
sms:
accessKeyId: xxxkey
accessKeySecret: xxxSecret
signName: mySignName
# 邮件发送(改为自己的账号)
mail:
from: sn93@qq.com
......@@ -26,9 +26,7 @@ spring:
mybatis-plus:
typeAliasesPackage: cn.stylefeng.guns.modular.system.model
mapper-locations:
- classpath*:cn/stylefeng/guns/sys/modular/**/mapping/*.xml
- classpath*:cn/stylefeng/guns/modular/**/mapping/*.xml
- classpath*:cn/stylefeng/guns/generator/**/mapping/*.xml
- classpath*:cn/stylefeng/guns/**/mapping/*.xml
log:
path: _app_logs
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment