# gitee-solon-plugin **Repository Path**: gitwcx/solon-gitee-plugin ## Basic Information - **Project Name**: gitee-solon-plugin - **Description**: gitee solon插件 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-13 - **Last Updated**: 2025-09-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitee-solon-plugin #### 介绍 solon gitee插件,用来简化Gitee Api 请求逻辑,仅通过简单配置,接口使用封装好的代码逻辑快速进行 oAuth认证、用户信息获取 等操作。 参考文档:[https://gitee.com/api/v5/oauth_doc#/](https://gitee.com/api/v5/oauth_doc#/) #### 目录结构 ``` com.walter.gitee configuration -配置相关 constant -常量相关 entity -调用gitee接口,返回的的数据实体 exception -自定义异常 integration -插件 service -具体的接口实现 ``` #### pom配置 1. 由于代码没有发不到maven中央仓库,需要在pom.xml文件配置仓库属性 ``` gitee-solon-plugin https://gitee.com/gitwcx/solon-gitee-plugin/raw/master/release/ ``` 2. 引入sdk依赖版本 ``` com.walter gitee-solon-plugin ${last-version} ``` 3. 修改最新依赖版本,依赖版本可[点击](https://gitee.com/gitwcx/solon-gitee-plugin/tree/master/release/com/walter/gitee-solon-plugin)查看 4. 配置,在app.yml中添加以下配置 ```yml solon.gitee: clientId: // 应用ID clientSecret: // 应用密钥 redirectUri: // 应用回调地址 ``` #### 相关API使用说明 ##### oAuth2 接口 > 该接口是为了获取 access_token > 跳转:[源码](https://gitee.com/-/ide/project/gitwcx/solon-gitee-plugin/edit/master/-/src/main/java/com/walter/gitee/service/OAuthService.java), > [测试方法](https://gitee.com/-/ide/project/gitwcx/solon-gitee-plugin/edit/master/-/src/test/java/com/walter/gitee/service/OAuthServiceTest.java) ##### API相关接口 > 该接口是为了获取Gitee其他的信息,比如用户信息、仓库信息等 > 跳转:[源码](https://gitee.com/-/ide/project/gitwcx/solon-gitee-plugin/edit/master/-/src/main/java/com/walter/gitee/service/APIService.java), > [测试方法](https://gitee.com/-/ide/project/gitwcx/solon-gitee-plugin/edit/master/-/src/test/java/com/walter/gitee/service/APIServiceTest.java) ##### 授权回调接口示例 > 该功能仅说明了一下如何通过回调接口获取用户信息,提供一个大概思路 > 跳转:[测试方法](https://gitee.com/-/ide/project/gitwcx/solon-gitee-plugin/edit/master/-/src/test/java/com/walter/gitee/CallbackTest.java) #### 目前已实现功能 - 用户授权 - 获取授权用户信息 - 获取授权用户邮箱 其他功能待有需求再逐步完善,欢迎一起共建、提issue,让我能知道您的需求 如果帮助到了您,还请给我一个star