# CQ HTTP组件 Springboot快速启动器
[![](https://img.shields.io/badge/simple--robot-core-green)](https://github.com/ForteScarlet/simple-robot-core) [![img](https://camo.githubusercontent.com/f8464f5d605886b8369ab6daf28d7130a72fd80e/68747470733a2f2f696d672e736869656c64732e696f2f6d6176656e2d63656e7472616c2f762f696f2e6769746875622e466f727465536361726c65742f73696d706c652d726f626f742d636f7265)](https://search.maven.org/artifact/io.github.ForteScarlet/simple-robot-core) <br>[![](https://img.shields.io/badge/simple--robot-component--cqhttp-green)](https://github.com/ForteScarlet/simple-robot-component-coolHttpApi) [![](https://img.shields.io/maven-central/v/io.github.ForteScarlet.simple-robot-core/component-forcoolqhttpapi)](https://search.maven.org/artifact/io.github.ForteScarlet.simple-robot-core/component-forcoolqhttpapi) <br>[![](https://img.shields.io/badge/simple--robot-core--springboot--starter-green)](https://github.com/ForteScarlet/simple-robot-core-springboot-starter) <br>[![](https://img.shields.io/badge/simple--robot-component--cqhttp--springboot--starter-green)](https://github.com/ForteScarlet/simple-robot-component-cqhttp-springboot-starter)[![](https://img.shields.io/maven-central/v/io.github.ForteScarlet.simple-robot/component-cqhttp-spring-boot-starter)](https://search.maven.org/artifact/io.github.ForteScarlet.simple-robot/component-cqhttp-spring-boot-starter) [![codebeat badge](https://codebeat.co/badges/d5ba017a-b029-41d6-be94-a17702e50e1c)](https://codebeat.co/projects/github-com-fortescarlet-simple-robot-component-cqhttp-springboot-starter-master) <br>[![](https://img.shields.io/badge/%E7%9C%8B%E4%BA%91%E6%96%87%E6%A1%A3-doc-green)](https://www.kancloud.cn/forte-scarlet/simple-coolq-doc) [![](https://img.shields.io/badge/QQ%E7%BE%A4-782930037-blue)](https://jq.qq.com/?_wv=1027&k=57ynqB1)
# 项目地址
[Github](https://github.com/ForteScarlet/simple-robot-component-cqhttp-springboot-starter) or [Gitee](https://gitee.com/ForteScarlet/simple-robot-component-cqhttp-springboot-starter)
## 使用
首先,引入依赖;
> https://search.maven.org/artifact/io.github.ForteScarlet.simple-robot/component-cqhttp-spring-boot-starter
**Maven**
```xml
<dependency>
<groupId>io.github.ForteScarlet.simple-robot</groupId>
<artifactId>component-cqhttp-spring-boot-starter</artifactId>
<version>${version}</version>
</dependency>
```
**Gradle**
```
implementation 'io.github.ForteScarlet.simple-robot:component-cqhttp-spring-boot-starter:${version}'
```
然后编写好配置类(与Springboot公用一个`application.properties`配置类)
~~配置编好后在启动类上使用@SimpleRobotSpringBootApplication代替`@SpringbootApplication注解,并启动Springboot即可。~~
```java
@SimpleRobotSpringBootApplication
public class TestApplication {
public static void main(String[] args) {
SpringApplication.run(Test1.class, args);
}
}
```
~~其中,@SimpleRobotSpringBootApplication是[核心启动器](https://github.com/ForteScarlet/simple-robot-core-springboot-starter)所提供的,如果切换官方启动器,理论上不需要变更代码。~~
**`1.9.1`之后,不再需要更替启动注解了。像往常一样即可。**
```java
@SpringBootApplication
public class RunApplication {
public static void main(String[] args) {
SpringApplication.run(RunApplication.class, args);
}
}
```
>[warning] **注意!** 一般来讲,整合Springboot的时候,你都需要去手动指定一下simple-robot的包扫描路径。配置项名为`core.scannerPackage`,具体内容参考文档的 **`配置`** 章节。
## 其他链接
快速启动器的Demo项目
#### 核心
https://github.com/ForteScarlet/simple-robot-core
#### CQ HTTP组件
https://github.com/ForteScarlet/simple-robot-component-coolHttpApi
#### 核心Springboot启动器
https://github.com/ForteScarlet/simple-robot-core-springboot-starter
- 前言
- 简单介绍
- 我该如何阅读文档
- 视频教程
- 安装与使用
- 开源协议
- 免责&捐助
- 注意事项
- 版本命名规则简介
- 主要功能版本历史
- 功能指引
- 通用API与功能
- 国际化语言
- 异常
- 消息监听
- @Listen
- @OnListen模板
- @Filter
- 消息参数截取
- @Spare
- @Constr
- @Ignore
- @ListenBreak
- @ListenBreakPlugin
- @ListenBody
- 监听响应
- 成功判定与返回值
- 监听上下文
- 动态参数
- 监听消息API
- 异步监听 @Async
- 限流监听 @Limit
- 自定义Http送信器
- 枚举与类型
- 送信器
- SENDER
- SETTER
- GETTER
- 返回值
- 其他位置
- 日志与日志拦截
- 异常处理
- 依赖注入
- 自定义依赖获取
- 批量依赖载入
- 注意事项
- 常量
- 定时任务
- 自定义过滤
- 拦截器
- 拦截器总定义
- 上下文对象总定义
- 监听消息拦截
- 送信器拦截
- 监听函数拦截
- CAT码
- CQ码
- CQCode
- CQ码工具类
- CQ扩展工具类
- AppendList拼接链
- 高级内容
- 阻断机制
- 截断机制
- 自定义枚举类型
- 枚举工厂
- byName注解
- 自定义注解
- 配置
- 文件配置
- 注解配置
- 参数配置
- 多配置
- 多账号
- 自定义账号管理器
- 小心!
- 核心版本与组件如何升级核心
- 核心版本迭代指南
- 核心
- 更新日志
- jar包与依赖
- 监听消息类结构图
- 快速启动
- 模组与扩展
- 模组开发
- 现有模组
- 通用模组-延时任务
- 通用模组-CQ码工具
- 转义器
- CQ码操作工具类
- CQ码模板-CodeTemplate
- CQ码载体-KQCode
- CQ码构建器
- MQ码工具类
- 通用模组-redis-bot管理器
- 通用模组-Debugger
- Debugger-common模块
- Debugger-server模块
- Debugger-client模块
- 通用模组-钉钉机器人
- 组件-Mirai(JVM)
- 快速开始(1.13+)
- springboot-starter
- 注意事项
- 配置
- 额外的内容
- 快速回复
- 额外监听
- CQ码解析
- 组件-酷Q(QQ)-CQ HTTP API(基本失效)
- 快速开始(推荐)
- 快速开始(1.7.x以下,不推荐)
- 快速开始(Springboot启动器)
- 启动器、启动接口与配置类
- 配置
- 文件配置
- 注意事项
- 更新日志
- 额外的内容
- 自定义额外监听
- CQ送信器
- 元事件
- 监听消息类结构图
- 组件-酷Q(QQ)-JCQ(失效)
- 快速开始
- 更新日志
- 额外的内容
- JCQ日志
- 配置
- 注意事项
- 监听消息类结构图
- 组件-酷Q(QQ)-HTTP TO CQ(失效)
- 快速开始(核心1.7.x及以下)
- 启动器、启动接口与配置类
- 配置
- 文件配置
- 注意事项
- 更新日志
- 监听消息类结构图
- 组件-酷Q(QQ)-LEMOC (失效)
- 快速开始(核心1.7.x及以下)
- 配置
- 注意事项
- 更新日志
- 监听消息类结构图
- Springboot快速启动器
- 常见问题汇总
- BUG反馈
- 更新计划总览