Skip to content

Commit ab61f5f

Browse files
authored
fix NotifyService not init bean issue (#168)
1 parent 975a670 commit ab61f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/run/ikaros/server/service/NotifyServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void mailTest(NotifyMailTestRequest notifyMailTestRequest) throws Messagi
5959
@Override
6060
public void afterPropertiesSet() throws Exception {
6161
OptionNotifyDTO optionNotifyDTO = optionService.getOptionNotifyDTO();
62-
if (optionNotifyDTO.getMailEnable()) {
62+
if (optionNotifyDTO.getMailEnable() != null && optionNotifyDTO.getMailEnable()) {
6363
mailSender = new JavaMailSenderImpl();
6464
mailSender.setHost(optionNotifyDTO.getMailSmtpHost());
6565
mailSender.setPort(optionNotifyDTO.getMailSmtpPort());

0 commit comments

Comments
 (0)