rss/rss-solver-protocal/README.md

28 lines
642 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

插件开发三步走
1. 插件主类继承 RegisterSpider 协议接口
2. 插件类添加注解 @RegisterSpider 表示要注册到容器中
3. 配置META-INF注册插件配置信息
> 仅实现了RegisterSpider的类才视为合法的插件
>
> 仅包含了@RegisterSpider的插件才会被注册到容器
>
> 仅配置文件注册了的插件类才会被ClassLoader装载
插件的META-INF需要添加配置文件rss_spider。
文件内容的格式类似于spring.factories以下仅为示例:
```properties
plugins=top.dreamcenter.rss.rsssolverpluginxhs.XhsSpider,top.dreamcenter.rss.rsssolverpluginxhs.WxSpider
```