model = new HashMap<>();
+// model.put("firstName", auth.getMember().getName());
+// model.put("lastName", auth.getMember().getCompanyName());
+// model.put("location", "Seoul");
+// model.put("signature", "www.loafle.com");
+// model.put("content", uri);
+//
+// mail.setModel(model);
+// emailSender.sendSimpleEmail(mail);
+//
+// this.emailAuthDAO.save(auth);
+//
+// return auth;
\ No newline at end of file
diff --git a/src/main/java/com/loafle/overflow/central/module/member/service/CentralMemberService.java b/src/main/java/com/loafle/overflow/central/module/member/service/CentralMemberService.java
index 39c8128..d570fa3 100644
--- a/src/main/java/com/loafle/overflow/central/module/member/service/CentralMemberService.java
+++ b/src/main/java/com/loafle/overflow/central/module/member/service/CentralMemberService.java
@@ -109,7 +109,7 @@ public class CentralMemberService implements MemberService {
Member resMember = this.memberDAO.save(member);
try {
- this.emailAuthService.sendEmailByMember(member.getId(), member.getEmail());
+ this.emailAuthService.sendEmailByMember(resMember);
} catch (Exception e) {
// Todo ReSend Mail
e.printStackTrace();
@@ -135,11 +135,11 @@ public class CentralMemberService implements MemberService {
return member;
}
- public Member resetPassword(String encodeEmail, String pw) throws OverflowException {
+ public Member resetPassword(String signinID, String newPw) throws OverflowException {
String deStr = null;
try {
- deStr = URLDecoder.decode(encodeEmail, "UTF-8");
+ deStr = URLDecoder.decode(signinID, "UTF-8");
}catch (Exception e) {
}
@@ -151,7 +151,7 @@ public class CentralMemberService implements MemberService {
throw new OverflowException("", null);
}
- boolean checkPass = this.isPasswordStrong(pw);
+ boolean checkPass = this.isPasswordStrong(newPw);
if (!checkPass) {
throw new OverflowException("PasswordNotStrongException()", new Throwable());
@@ -159,7 +159,7 @@ public class CentralMemberService implements MemberService {
// "special character, lowercase letter, and number, " +
// "and must be at least 6 characters long.");
}
- member.setPw(passwordEncoder.encode(pw));
+ member.setPw(passwordEncoder.encode(newPw));
return this.modify(member);
}
diff --git a/src/main/java/com/loafle/overflow/central/module/probe/service/CentralProbeService.java b/src/main/java/com/loafle/overflow/central/module/probe/service/CentralProbeService.java
index d3bbde2..7b3018c 100644
--- a/src/main/java/com/loafle/overflow/central/module/probe/service/CentralProbeService.java
+++ b/src/main/java/com/loafle/overflow/central/module/probe/service/CentralProbeService.java
@@ -1,6 +1,7 @@
package com.loafle.overflow.central.module.probe.service;
import com.loafle.overflow.central.module.probe.dao.ProbeDAO;
+import com.loafle.overflow.core.annotation.WebappAPI;
import com.loafle.overflow.core.exception.OverflowException;
import com.loafle.overflow.model.domain.Domain;
import com.loafle.overflow.model.probe.Probe;
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..95fa5da
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1 @@
+spring.profiles.active=@activatedProperties@
\ No newline at end of file
diff --git a/src/main/resources/local/init.sql b/src/main/resources/local/init.sql
index e2ec7c5..11e6b9b 100644
--- a/src/main/resources/local/init.sql
+++ b/src/main/resources/local/init.sql
@@ -864,7 +864,10 @@ INSERT INTO public.meta_history_type (id,create_date,"name") VALUES (
INSERT INTO public.meta_history_type (id,create_date,"name") VALUES (
6,'2017-08-23 13:28:26.966','Sensor');
-
+INSERT INTO public.meta_email_status (id,create_date,"name") VALUES (
+1,'2017-08-23 13:28:26.966','signup confirm');
+INSERT INTO public.meta_email_status (id,create_date,"name") VALUES (
+2,'2017-08-23 13:28:26.966','reset password confirm');
@@ -885,11 +888,11 @@ INSERT INTO public."member" (company_name,create_date,email,"name",phone,pw,stat
INSERT INTO public."member" (company_name,create_date,email,"name",phone,pw,status_id) VALUES (
'loafle','2017-06-26 11:07:27.625','geekdev@naver.com','geek','000-000-0000','$2a$10$G2bbjoX9.fOnxJx/8DZqPujFYrEQtIEB.f98/8K20XiGWEhwPakZ.',2);
-INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id) VALUES (
-'2017-06-27 15:28:48.895','2017-06-26 15:28:48.895','dbseogns1234',1);
+INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id, status) VALUES (
+'2017-06-27 15:28:48.895','2017-06-26 15:28:48.895','dbseogns1234',1,1);
-INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id) VALUES (
-'2017-12-26 15:28:48.895','2017-11-22 12:28:48.895','dbseogns1234',2);
+INSERT INTO public.email_auth (auth_confirm_date,create_date,email_auth_key,member_id, status) VALUES (
+'2017-12-26 15:28:48.895','2017-11-22 12:28:48.895','dbseogns1234',2,1);
INSERT INTO public."domain" (create_date,"name") VALUES (
'2017-06-26 11:25:44.866','overFlow''s domain');
diff --git a/src/main/resources/local/mail.properties b/src/main/resources/local/mail.properties
index 99f696d..0a01f91 100644
--- a/src/main/resources/local/mail.properties
+++ b/src/main/resources/local/mail.properties
@@ -2,7 +2,7 @@
mail.host=smtp.worksmobile.com
mail.port=465
mail.username=geek@loafle.com
-mail.password=@loafle@5795
+mail.password=@cosmos@5795
mail.protocol=smtps
mail.properties.mail.smtp.auth=true
diff --git a/src/main/resources/signup_email.vm b/src/main/resources/local/vmtemplates/password_reset.vm
similarity index 71%
rename from src/main/resources/signup_email.vm
rename to src/main/resources/local/vmtemplates/password_reset.vm
index ac6dcf3..98aacb1 100644
--- a/src/main/resources/signup_email.vm
+++ b/src/main/resources/local/vmtemplates/password_reset.vm
@@ -4,7 +4,7 @@
Dear ${firstName} ${lastName},
-Sending Email Velocity Template Test !!!
+Sending Email ${content}
Thanks
${signature}
${location}
diff --git a/src/main/resources/local/vmtemplates/signup.vm b/src/main/resources/local/vmtemplates/signup.vm
new file mode 100644
index 0000000..98aacb1
--- /dev/null
+++ b/src/main/resources/local/vmtemplates/signup.vm
@@ -0,0 +1,13 @@
+
+
+
+
+
+Dear ${firstName} ${lastName},
+Sending Email ${content}
+Thanks
+${signature}
+${location}
+
+
+
\ No newline at end of file
diff --git a/src/test/java/com/loafle/overflow/central/module/email/service/EmailAuthServiceTest.java b/src/test/java/com/loafle/overflow/central/module/email/service/EmailAuthServiceTest.java
index 4b6592a..5acc2c6 100644
--- a/src/test/java/com/loafle/overflow/central/module/email/service/EmailAuthServiceTest.java
+++ b/src/test/java/com/loafle/overflow/central/module/email/service/EmailAuthServiceTest.java
@@ -3,6 +3,7 @@ package com.loafle.overflow.central.module.email.service;
import com.loafle.overflow.central.spring.AppConfigTest;
import com.loafle.overflow.model.email.EmailAuth;
+import com.loafle.overflow.model.member.Member;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,7 +29,10 @@ public class EmailAuthServiceTest {
@Test
@Ignore
public void TestMailSend() throws Exception {
- this.emailAuthService.sendEmailByMember((long)1, "geek@loafle.com");
+ Member member = new Member();
+ member.setId(1);
+ member.setEmail("overflow@loafle.com");
+ this.emailAuthService.sendEmailByMember(member);
}
@Test