mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
更新间隔外部配置
This commit is contained in:
parent
d898e412c7
commit
05dcf7056b
@ -31,6 +31,9 @@ public class StartListener implements ServletContextListener {
|
|||||||
@Value("${website.domain}")
|
@Value("${website.domain}")
|
||||||
private String webSiteDomain;
|
private String webSiteDomain;
|
||||||
|
|
||||||
|
@Value("${books.updatePeriod}")
|
||||||
|
private float bookUpdatePeriod;
|
||||||
|
|
||||||
private final SeoConfig seoConfig;
|
private final SeoConfig seoConfig;
|
||||||
|
|
||||||
|
|
||||||
@ -49,8 +52,7 @@ public class StartListener implements ServletContextListener {
|
|||||||
|
|
||||||
log.info("parseBooks执行中。。。。。。。。。。。。");
|
log.info("parseBooks执行中。。。。。。。。。。。。");
|
||||||
crawlSource.parse();
|
crawlSource.parse();
|
||||||
|
Thread.sleep(new Float(1000 * 60 * bookUpdatePeriod).longValue());
|
||||||
Thread.sleep(1000 * 60 * 5);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
@ -65,9 +65,11 @@ index:
|
|||||||
mysql:
|
mysql:
|
||||||
charset: utf8mb4
|
charset: utf8mb4
|
||||||
|
|
||||||
#爬取小说数据的最低评分
|
|
||||||
books:
|
books:
|
||||||
|
#爬取小说数据的最低评分
|
||||||
lowestScore: 6.0
|
lowestScore: 6.0
|
||||||
|
#小说的更新间隔(分)
|
||||||
|
updatePeriod: 5
|
||||||
|
|
||||||
#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔,3:顶点小说 更多网站解析中,敬请期待
|
#爬取的网站名称类型 1:笔趣岛 ,2:笔趣塔,3:顶点小说 更多网站解析中,敬请期待
|
||||||
crawl:
|
crawl:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user