Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
a42e1ca7
Commit
a42e1ca7
authored
May 11, 2019
by
zhengjie
Browse files
1.8 版本
parent
61a9b45a
Changes
23
Hide whitespace changes
Inline
Side-by-side
eladmin-tools/src/main/java/me/zhengjie/service/QiNiuService.java
View file @
a42e1ca7
...
@@ -19,7 +19,7 @@ public interface QiNiuService {
...
@@ -19,7 +19,7 @@ public interface QiNiuService {
* 查配置
* 查配置
* @return
* @return
*/
*/
@Cacheable
(
key
=
"'1'"
)
@Cacheable
(
cacheNames
=
"qiNiuConfig"
,
key
=
"'1'"
)
QiniuConfig
find
();
QiniuConfig
find
();
/**
/**
...
@@ -27,7 +27,7 @@ public interface QiNiuService {
...
@@ -27,7 +27,7 @@ public interface QiNiuService {
* @param qiniuConfig
* @param qiniuConfig
* @return
* @return
*/
*/
@CachePut
(
key
=
"'1'"
)
@CachePut
(
cacheNames
=
"qiNiuConfig"
,
key
=
"'1'"
)
QiniuConfig
update
(
QiniuConfig
qiniuConfig
);
QiniuConfig
update
(
QiniuConfig
qiniuConfig
);
/**
/**
...
...
eladmin-tools/src/main/java/me/zhengjie/service/impl/EmailServiceImpl.java
View file @
a42e1ca7
package
me.zhengjie.service.impl
;
package
me.zhengjie.service.impl
;
import
cn.hutool.extra.mail.Mail
;
import
cn.hutool.extra.mail.MailAccount
;
import
cn.hutool.extra.mail.MailAccount
;
import
cn.hutool.extra.mail.MailUtil
;
import
cn.hutool.extra.mail.MailUtil
;
import
me.zhengjie.domain.EmailConfig
;
import
me.zhengjie.domain.EmailConfig
;
...
@@ -76,12 +77,15 @@ public class EmailServiceImpl implements EmailService {
...
@@ -76,12 +77,15 @@ public class EmailServiceImpl implements EmailService {
/**
/**
* 发送
* 发送
*/
*/
new
MailAccount
();
try
{
try
{
MailUtil
.
send
(
account
,
Mail
.
create
(
account
)
emailVo
.
getTos
(),
.
setTos
(
String
.
valueOf
(
emailVo
.
getTos
()))
emailVo
.
getSubject
(),
.
setTitle
(
emailVo
.
getSubject
())
content
,
.
setContent
(
content
)
true
);
.
setHtml
(
true
)
.
setUseGlobalSession
(
false
)
//关闭session
.
send
();
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
throw
new
BadRequestException
(
e
.
getMessage
());
throw
new
BadRequestException
(
e
.
getMessage
());
}
}
...
...
pom.xml
View file @
a42e1ca7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<groupId>
me.zhengjie
</groupId>
<groupId>
me.zhengjie
</groupId>
<artifactId>
eladmin
</artifactId>
<artifactId>
eladmin
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<version>
1.
5
</version>
<version>
1.
8
</version>
<modules>
<modules>
<module>
eladmin-common
</module>
<module>
eladmin-common
</module>
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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