{"id":15670519,"url":"https://github.com/cssxsh/spring-boot-mirai","last_synced_at":"2025-07-27T23:35:22.242Z","repository":{"id":65510249,"uuid":"561310442","full_name":"cssxsh/spring-boot-mirai","owner":"cssxsh","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-26T15:46:09.000Z","size":141,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T20:41:11.883Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssxsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-03T12:21:14.000Z","updated_at":"2023-02-15T09:32:30.000Z","dependencies_parsed_at":"2024-10-23T10:26:53.997Z","dependency_job_id":"1d6c74d2-5553-4ef0-bd52-be0144e8116b","html_url":"https://github.com/cssxsh/spring-boot-mirai","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"b3f2119c4cf73236aa6ca3bf1da610647530496f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cssxsh/spring-boot-mirai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fspring-boot-mirai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fspring-boot-mirai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fspring-boot-mirai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fspring-boot-mirai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssxsh","download_url":"https://codeload.github.com/cssxsh/spring-boot-mirai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fspring-boot-mirai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267441446,"owners_count":24087772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T15:00:52.361Z","updated_at":"2025-07-27T23:35:22.219Z","avatar_url":"https://github.com/cssxsh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Spring Boot Mirai](https://github.com/cssxsh/spring-boot-mirai)\n\n\u003e Spring Boot 3.0 前置扩展\n\n**注意 本扩展具有一定的娱乐性质，不喜勿喷**\n\n[Mirai Console](https://github.com/mamoe/mirai-console) 的前置插件，用于 Spring Boot 的初始化  \n\n[![maven-central](https://img.shields.io/maven-central/v/xyz.cssxsh.mirai/spring-boot-mirai-starter)](https://search.maven.org/artifact/xyz.cssxsh.mirai/spring-boot-mirai-starter)\n\n## 数据库支持\n\n**别急你别急**\n\n## 指令系统\n\n**别急你别急**\n\n## 在 Mirai Console Plugin 项目中引用\n\n**build.gradle.kts**\n```kotlin\nplugins {\n    kotlin(\"jvm\") version \"1.7.22\"\n    kotlin(\"plugin.spring\") version \"1.7.22\"\n    kotlin(\"plugin.serialization\") version \"1.7.22\"\n    \n    id(\"net.mamoe.mirai-console\") version \"2.14.0\"\n    id(\"org.springframework.boot\") version \"3.0.3\"\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compileOnly(\"xyz.cssxsh.mirai:spring-boot-mirai-starter:${version}\")\n    implementation(platform(\"org.springframework.boot:spring-boot-dependencies:3.0.3\"))\n}\n\n// Spring Boot 3.0 需要 jdk-17\nmirai {\n    jvmTarget = JavaVersion.VERSION_17\n}\n```\n\n**插件主类**\n由于 mirai-console 没有相关钩子，所以你需要在插件的主类中调用一下 `SpringBootMiraiStartupExtension`\n```kotlin\nxyz.cssxsh.mirai.spring.SpringBootMiraiStartupExtension\n```\n\n**Spring Boot 3.0 中需要以 `AutoConfiguration.imports` 的形式添加 EnableAutoConfiguration 配置**   \n例如 [imports](spring-boot-mirai-onebot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports)\n\n## 示例代码\n\n* [spring-boot-mirai-onebot](spring-boot-mirai-onebot)\n\n## 安装\n\n### MCL 指令安装\n\n**请确认 mcl.jar 的版本是 2.1.0+**  \n`./mcl --update-package xyz.cssxsh.mirai:spring-boot-mirai-starter --channel maven-stable --type libs`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fspring-boot-mirai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssxsh%2Fspring-boot-mirai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fspring-boot-mirai/lists"}