Skip to content
Snippets Groups Projects
Commit 2d775d2b authored by Rick Herrick's avatar Rick Herrick
Browse files

Changed bean type of mailSender to be impl rather than interface. Auto wiring fails otherwise.

parent 8031e953
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,6 @@ import org.nrg.xdat.preferences.InitializerSiteConfiguration; ...@@ -10,7 +10,6 @@ import org.nrg.xdat.preferences.InitializerSiteConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.JavaMailSenderImpl; import org.springframework.mail.javamail.JavaMailSenderImpl;
import javax.inject.Inject; import javax.inject.Inject;
...@@ -25,7 +24,7 @@ import java.util.Properties; ...@@ -25,7 +24,7 @@ import java.util.Properties;
public class NotificationsConfig { public class NotificationsConfig {
@Bean @Bean
public JavaMailSender mailSender() throws IOException, SiteConfigurationException { public JavaMailSenderImpl mailSender() throws IOException, SiteConfigurationException {
final Map<String, String> smtp = _preferences.getSmtpServer(); final Map<String, String> smtp = _preferences.getSmtpServer();
final JavaMailSenderImpl sender = new JavaMailSenderImpl(); final JavaMailSenderImpl sender = new JavaMailSenderImpl();
sender.setHost(StringUtils.defaultIfBlank(smtp.remove("host"), "localhost")); sender.setHost(StringUtils.defaultIfBlank(smtp.remove("host"), "localhost"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment