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})