Commit 157f295d by chenweitao

增加md说明

parent 0af9815d
...@@ -5,7 +5,25 @@ ...@@ -5,7 +5,25 @@
采集地址:https://d.weibo.com/1087030002_417# 采集地址:https://d.weibo.com/1087030002_417#
> 使用quartz定时器,所以主方法中仅初始化spring容器 > 使用quartz定时器,所以主方法中仅初始化spring容器
> 定时器程序入口在 com.zhiweidata.weiboDomain.quartz
> package com.zhiweidata.weiboDomain.start;
> public static void main(String[] args) {
> ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
>
> System.out.println("微博热门榜单采集开始...");
> //程序主体切换至com.zhiweidata.weiboDomain.quartz定时器
>
> }
> 定时器程序入口在 com.zhiweidata.weiboDomain.quartz
>
> @Scheduled(cron = "0 0 20 * * *")
> public void execute() {
> String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd
> HH"));
> long start = System.currentTimeMillis();
> String cookie = "";
> serice.crawlerData(cookie);
> long end = System.currentTimeMillis();
> log.info(time + "次运行耗时:" + (end - start) + "\t毫秒");
> }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment