zhegexiaohuozi / SeimiCrawler

一个简单、敏捷、分布式的支持SpringBoot的Java爬虫框架;An agile, distributed crawler framework.
http://seimicrawler.org
Apache License 2.0
1.98k stars 681 forks source link

关于注解使用 #24

Closed CrazyShaQuiShi closed 5 years ago

CrazyShaQuiShi commented 7 years ago
       Seimi s = new Seimi();
         s.scan("com");

这个scan方法是设置扫描某个包下带有Crawler注解的意思吗?为什么我配置成com还是报 13:39:06 ERROR cn.wanghaomiao.seimi.core.Seimi - can not find any crawlers,please check! 难道只能扫描包名称是cn.wanghaomiao的包下的注解类吗?

zhegexiaohuozi commented 7 years ago

不是

ycjnono commented 6 years ago

"crawlers","queues","interceptors","cn.wanghaomiao.seimi",中间选一个

zhegexiaohuozi commented 6 years ago

具体代码在这里:

https://github.com/zhegexiaohuozi/SeimiCrawler/blob/25d0930b5fec7959bcb6901713d27a04da6e79e5/project/src/main/java/cn/wanghaomiao/seimi/core/SeimiContext.java#L82

其中cn.wanghaomiao.seimi目的是扫描一些默认的实现,并不是对开发者的约定。约定的包路径主要是 "crawlers","queues","interceptors"