Commit a42e1ca7 authored by zhengjie's avatar zhengjie
Browse files

1.8 版本

parent 61a9b45a
...@@ -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);
/** /**
......
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());
} }
......
...@@ -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>
......
Supports Markdown
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