From a7eb3eea5b460b7fd428832c83141834b01c9bac Mon Sep 17 00:00:00 2001 From: geek Date: Thu, 29 Jun 2017 11:40:43 +0900 Subject: [PATCH] email bean error modify --- .../loafle/overflow/module/email/service/EmailAuthService.java | 1 + src/main/java/com/loafle/overflow/spring/MailConfiguration.java | 2 ++ .../overflow/module/email/service/EmailAuthServiceTest.java | 1 + 3 files changed, 4 insertions(+) diff --git a/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java index 0a1f35f..69ba19f 100644 --- a/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java +++ b/src/main/java/com/loafle/overflow/module/email/service/EmailAuthService.java @@ -15,6 +15,7 @@ public class EmailAuthService { @Autowired private JavaMailSender mailSender; + public void sendEmail(String to, String sub, String message) { try { diff --git a/src/main/java/com/loafle/overflow/spring/MailConfiguration.java b/src/main/java/com/loafle/overflow/spring/MailConfiguration.java index 5aa592d..8db6d19 100644 --- a/src/main/java/com/loafle/overflow/spring/MailConfiguration.java +++ b/src/main/java/com/loafle/overflow/spring/MailConfiguration.java @@ -16,6 +16,8 @@ import java.util.Properties; //@ComponentScan(basePackages = "com.loafle.overflow", includeFilters = @ComponentScan.Filter(EmailAuth.class)) public class MailConfiguration { + + @Value("${mail.host}") private String host; @Value("${mail.port}") diff --git a/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java b/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java index 449d86d..91c4f9b 100644 --- a/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/email/service/EmailAuthServiceTest.java @@ -12,6 +12,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * Created by geek on 17. 6. 28. */ + @Ignore @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {AppConfig.class,MailConfiguration.class})