From 2d775d2b9762d25b24f3433c43f9b92c82593d4b Mon Sep 17 00:00:00 2001 From: Rick Herrick <jrherrick@wustl.edu> Date: Mon, 2 May 2016 12:00:59 -0500 Subject: [PATCH] Changed bean type of mailSender to be impl rather than interface. Auto wiring fails otherwise. --- .../java/org/nrg/xnat/configuration/NotificationsConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/nrg/xnat/configuration/NotificationsConfig.java b/src/main/java/org/nrg/xnat/configuration/NotificationsConfig.java index 55a52158..ff21b027 100644 --- a/src/main/java/org/nrg/xnat/configuration/NotificationsConfig.java +++ b/src/main/java/org/nrg/xnat/configuration/NotificationsConfig.java @@ -10,7 +10,6 @@ import org.nrg.xdat.preferences.InitializerSiteConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.JavaMailSenderImpl; import javax.inject.Inject; @@ -25,7 +24,7 @@ import java.util.Properties; public class NotificationsConfig { @Bean - public JavaMailSender mailSender() throws IOException, SiteConfigurationException { + public JavaMailSenderImpl mailSender() throws IOException, SiteConfigurationException { final Map<String, String> smtp = _preferences.getSmtpServer(); final JavaMailSenderImpl sender = new JavaMailSenderImpl(); sender.setHost(StringUtils.defaultIfBlank(smtp.remove("host"), "localhost")); -- GitLab