Skip to content

Commit

Permalink
Merge pull request #174 from RossKWSang/feature/monthly-book-mail
Browse files Browse the repository at this point in the history
[feat] 메일링 서비스 중지
  • Loading branch information
RossKWSang authored Nov 27, 2023
2 parents 34f05d2 + 7d7de72 commit e609f20
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

import com.kernel360.boogle.book.db.BookEntity;
import com.kernel360.boogle.book.db.BookRepository;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -56,10 +54,9 @@ protected PasswordAuthentication getPasswordAuthentication() {
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(userEmail));


// 수신자 메일 목록을 아래에 작성
String[] recipientAddresses = {
"2018190529@korea.ac.kr",
"rosskysoss@gmail.com"
"reciver@gmail.com"
};

InternetAddress[] recipientInternetAddresses = new InternetAddress[recipientAddresses.length];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public Step monthlyMailingStep(Tasklet tasklet) {
@Bean
public Tasklet tasklet() {
return ((contribution, chunkContext) -> {
mailForNewRelease.send();
// 메일링 서비스를 수행하시려면 다음의 코드를 삽입하세요.
// mailForNewRelease.send();
// boogle.kernel360@gmail.com 메일은 삭제됩니다.
System.out.println("Spring Batch Job Done!");
return RepeatStatus.FINISHED;
});
}
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,3 @@ aladin:
book-detail.url: http://www.aladin.co.kr/ttb/api/ItemLookUp.aspx
server:
port: 8421
mail:
batch:
email: ${email}
password: ${password}
5 changes: 0 additions & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,3 @@ thymeleaf:
prefix: classpath:/templates/
suffix: .html
enabled: true

mail:
batch:
email: ENC(5scm9xx1SCH7uuydIwVBLy5PEvRrOFb0HKsdTVEpW4ldLIO94tOX5dUUSbf9yLvY)
password: ENC(tkM0HhbhIbnzx1i+wy/7/6OO48hEG3XilL9NTb0FuZujbrEzJVtINQ==)

0 comments on commit e609f20

Please sign in to comment.