Skip to content

Commit

Permalink
[#26] CrawlingService: @async 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chaiminwoo0223 authored Jun 9, 2024
1 parent 84f2d36 commit 050c033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/skhu/jijijig/service/CrawlingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.springframework.context.ApplicationContext;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -45,6 +46,7 @@ public void scheduleCrawlingTasks() {
crawlingService.performCrawling("https://quasarzone.com/bbs/qb_saleinfo", "퀘사이존", "div.market-info-list");
}

@Async
@Transactional
public void performCrawling(String url, String label, String rowsCssSelector) {
System.out.println(label);
Expand Down

0 comments on commit 050c033

Please sign in to comment.