Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
374ca8aa
Commit
374ca8aa
authored
May 17, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加邮件发送和短信发送
parent
dcab126d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
4 deletions
+53
-4
guns-sys/src/main/java/cn/stylefeng/guns/sys/config/datasource/SingleDataSourceConfig.java
+1
-1
guns-vip-main/pom.xml
+14
-0
guns-vip-main/src/main/resources/application-dev.yml
+18
-0
guns-vip-main/src/main/resources/application-local.yml
+18
-0
guns-vip-main/src/main/resources/application.yml
+2
-3
No files found.
guns-sys/src/main/java/cn/stylefeng/guns/sys/config/datasource/SingleDataSourceConfig.java
View file @
374ca8aa
...
@@ -31,7 +31,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -31,7 +31,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@Configuration
@ConditionalOnProperty
(
prefix
=
"guns.muti-datasource"
,
name
=
"open"
,
havingValue
=
"false"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
prefix
=
"guns.muti-datasource"
,
name
=
"open"
,
havingValue
=
"false"
,
matchIfMissing
=
true
)
@EnableTransactionManagement
(
proxyTargetClass
=
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
{
public
class
SingleDataSourceConfig
{
}
}
...
...
guns-vip-main/pom.xml
View file @
374ca8aa
...
@@ -24,6 +24,20 @@
...
@@ -24,6 +24,20 @@
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</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>
<dependency>
<groupId>
cn.stylefeng
</groupId>
<groupId>
cn.stylefeng
</groupId>
...
...
guns-vip-main/src/main/resources/application-dev.yml
View file @
374ca8aa
...
@@ -38,6 +38,13 @@ spring:
...
@@ -38,6 +38,13 @@ spring:
filters
:
wall,mergeStat
filters
:
wall,mergeStat
data-source-name
:
gunsdb
data-source-name
:
gunsdb
# 邮件发送配置(改为自己的账号和密码)
mail
:
host
:
smtp.qq.com
port
:
587
username
:
sn93@qq.com
password
:
xxxpassword
# 多数据源情况的配置
# 多数据源情况的配置
guns
:
guns
:
muti-datasource
:
muti-datasource
:
...
@@ -47,3 +54,14 @@ guns:
...
@@ -47,3 +54,14 @@ guns:
username
:
root
username
:
root
password
:
root
password
:
root
data-source-name
:
otherdb
data-source-name
:
otherdb
# 阿里云短信发送配置
aliyun
:
sms
:
accessKeyId
:
xxxkey
accessKeySecret
:
xxxSecret
signName
:
mySignName
# 邮件发送(改为自己的账号)
mail
:
from
:
sn93@qq.com
guns-vip-main/src/main/resources/application-local.yml
View file @
374ca8aa
...
@@ -38,6 +38,13 @@ spring:
...
@@ -38,6 +38,13 @@ spring:
filters
:
wall,mergeStat
filters
:
wall,mergeStat
data-source-name
:
gunsdb
data-source-name
:
gunsdb
# 邮件发送配置(改为自己的账号和密码)
mail
:
host
:
smtp.qq.com
port
:
587
username
:
sn93@qq.com
password
:
xxxpassword
# 多数据源情况的配置
# 多数据源情况的配置
guns
:
guns
:
muti-datasource
:
muti-datasource
:
...
@@ -47,3 +54,14 @@ guns:
...
@@ -47,3 +54,14 @@ guns:
username
:
root
username
:
root
password
:
root
password
:
root
data-source-name
:
otherdb
data-source-name
:
otherdb
# 阿里云短信发送配置
aliyun
:
sms
:
accessKeyId
:
xxxkey
accessKeySecret
:
xxxSecret
signName
:
mySignName
# 邮件发送(改为自己的账号)
mail
:
from
:
sn93@qq.com
guns-vip-main/src/main/resources/application.yml
View file @
374ca8aa
...
@@ -26,9 +26,7 @@ spring:
...
@@ -26,9 +26,7 @@ spring:
mybatis-plus
:
mybatis-plus
:
typeAliasesPackage
:
cn.stylefeng.guns.modular.system.model
typeAliasesPackage
:
cn.stylefeng.guns.modular.system.model
mapper-locations
:
mapper-locations
:
-
classpath*:cn/stylefeng/guns/sys/modular/**/mapping/*.xml
-
classpath*:cn/stylefeng/guns/**/mapping/*.xml
-
classpath*:cn/stylefeng/guns/modular/**/mapping/*.xml
-
classpath*:cn/stylefeng/guns/generator/**/mapping/*.xml
log
:
log
:
path
:
_app_logs
path
:
_app_logs
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment