Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

ForteScarlet/simple-robot-component-cqhttp-springboot-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CQ HTTP组件 Springboot快速启动器

img


codebeat badge

项目地址

Github or Gitee

使用

首先,引入依赖;

https://search.maven.org/artifact/io.github.ForteScarlet.simple-robot/component-cqhttp-spring-boot-starter

Maven

<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即可。

@SimpleRobotSpringBootApplication
public class TestApplication {
    public static void main(String[] args) {
        SpringApplication.run(Test1.class, args);
    }
}

其中,@SimpleRobotSpringBootApplication核心启动器所提供的,如果切换官方启动器,理论上不需要变更代码。

1.9.1之后,不再需要更替启动注解了。像往常一样即可。

@SpringBootApplication
public class RunApplication {
    public static void main(String[] args) {
        SpringApplication.run(RunApplication.class, args);
    }
}

核心启动器

每一个组件启动器中一般来说都包含一个核心启动器。

正常情况下,你无需手动导入此坐标。

核心启动器的坐标为:

仓库地址:https://search.maven.org/artifact/io.github.ForteScarlet.simple-robot/core-spring-boot-starter

<dependency>
    <groupId>io.github.ForteScarlet.simple-robot</groupId>
    <artifactId>core-spring-boot-starter</artifactId>
    <version>${version}</version>
</dependency>

但是,假如:组件启动器的版本为1.9.1,而前缀同为1.9的核心启动器的最新一个版本是1.9.2,那么你可以选择手动导入这个更新一个版本的核心来升级内部的核心启动器。

其他链接

快速启动器的Demo项目

https://github.com/ForteScarlet/simple-robot-demo-cqhttp-sbstarter

核心

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

更新日志

查看UPDATE.md文件

Releases

No releases published

Packages

No packages published

Languages