remove mail server
This commit is contained in:
@ -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
|
||||
|
@ -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("密码错误");
|
||||
}
|
||||
|
Reference in New Issue
Block a user