remove mail server

This commit is contained in:
hupeng
2020-01-04 09:51:13 +08:00
parent 5513065e96
commit b5c4386963
2 changed files with 2 additions and 21 deletions

View File

@ -8,8 +8,6 @@ import com.github.qcloudsms.SmsSingleSender;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl;
@Configuration
@EnableConfigurationProperties(NotifyProperties.class)
@ -25,12 +23,6 @@ public class NotifyAutoConfiguration {
public NotifyService notifyService() {
NotifyService notifyService = new NotifyService();
NotifyProperties.Mail mailConfig = properties.getMail();
if (mailConfig.isEnable()) {
notifyService.setMailSender(mailSender());
notifyService.setSendFrom(mailConfig.getSendfrom());
notifyService.setSendTo(mailConfig.getSendto());
}
NotifyProperties.Sms smsConfig = properties.getSms();
if (smsConfig.isEnable()) {
@ -47,15 +39,7 @@ public class NotifyAutoConfiguration {
return notifyService;
}
@Bean
public JavaMailSender mailSender() {
NotifyProperties.Mail mailConfig = properties.getMail();
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost(mailConfig.getHost());
mailSender.setUsername(mailConfig.getUsername());
mailSender.setPassword(mailConfig.getPassword());
return mailSender;
}
@Bean

View File

@ -73,10 +73,7 @@ public class AuthenticationController {
}
final JwtUser jwtUser = (JwtUser) userDetailsService.loadUserByUsername(authorizationUser.getUsername());
// System.out.println(jwtUser.getUsername());
// System.out.println(jwtUser.getPassword());
//System.out.println(EncryptUtils.encryptPassword(authorizationUser.getPassword()));
//System.out.println(authorizationUser.getPassword());
if(!jwtUser.getPassword().equals(EncryptUtils.encryptPassword(authorizationUser.getPassword()))){
throw new AccountExpiredException("密码错误");
}