Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
blacklee123 committed Sep 21, 2024
0 parents commit e5feaea
Show file tree
Hide file tree
Showing 45 changed files with 1,545 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*.iml
.idea
target/
.vscode/
.DS_Store
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 qaq-public

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TAG?=1.0.0
NAME:=qaq-common

deploy:
mvn clean package deploy

51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# qaq-base-java

qaq 的 java 公用代码,旨在让 QAQ 开发者便捷的调用 QAQ 开放 API。
[发布 Maven 包的正确姿势](https://zhuanlan.zhihu.com/p/141676033)

## 目录
<!-- toc -->

- [安装](#安装)
- [加入答疑群](#加入答疑群)
- [License](#License)

<!-- tocstop -->

## 安装

- 运行环境:JDK 21 及以上

- 最新版本 maven 坐标

```shell
<dependency>
<groupId>io.github.qaq-public</groupId>
<artifactId>qaq-common</artifactId>
<version>1.0.0</version>
</dependency>
```

- 如无法获取 qaq 依赖,请在 pom.xml 的 <project> 里增加 <repositories>

```shell
<project>
<repositories>
<repository>
<id>gitpub-qaq-repo</id>
<name>The QAQ Repository on Github</name>
<url>https://qaq-public.github.io/qaq-common/maven-repo/</url>
</repository>
</repositories>
<dependencies>
...
</dependencies>
</project>
```

## 加入答疑群

[单击加入答疑群](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=828s731f-83f2-400a-b093-04667ca93d4c)

## License
使用 MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6515e3e8fa38c41cd7601b4fd6867055
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7937230f0c22b50bd2de503cba3e7de9f4c385b0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
89c7cd66d2eb2e44401dd5be876fbe15
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
738b34b056bb4e007d155122910d60d537c587ac
101 changes: 101 additions & 0 deletions maven-repo/io/github/qaq-public/qaq-common/1.0.0/qaq-common-1.0.0.pom
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>io.github.qaq-public</groupId>
<artifactId>qaq-common</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>qaq-common</name>
<developers>
<developer>
<name>blacklee123</name>
<email>[email protected]</email>
<organization>qaq-public</organization>
<organizationUrl>https://qaq-public.github.io</organizationUrl>
</developer>
</developers>

<properties>
<!-- source encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.larksuite.oapi</groupId>
<artifactId>oapi-sdk</artifactId>
<version>2.3.4</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.22.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>local-repo-release</id>
<name>GitHub Release</name>
<url>file://${project.basedir}/maven-repo</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b4341fd663b1af41e057a47e901ff13c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c7843350bb2c02180ba8e133873f60264933719b
12 changes: 12 additions & 0 deletions maven-repo/io/github/qaq-public/qaq-common/maven-metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>io.github.qaq-public</groupId>
<artifactId>qaq-common</artifactId>
<versioning>
<release>1.0.0</release>
<versions>
<version>1.0.0</version>
</versions>
<lastUpdated>20240921064523</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a58a8999e938cc4054cfbdbce752906b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7f8ac3db05b4b357367308831d6c4a75dc06df01
101 changes: 101 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>io.github.qaq-public</groupId>
<artifactId>qaq-common</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>qaq-common</name>
<developers>
<developer>
<name>blacklee123</name>
<email>[email protected]</email>
<organization>qaq-public</organization>
<organizationUrl>https://qaq-public.github.io</organizationUrl>
</developer>
</developers>

<properties>
<!-- source encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.larksuite.oapi</groupId>
<artifactId>oapi-sdk</artifactId>
<version>2.3.4</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.9.22.1</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>local-repo-release</id>
<name>GitHub Release</name>
<url>file://${project.basedir}/maven-repo</url>
</repository>
</distributionManagement>

<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
12 changes: 12 additions & 0 deletions src/main/java/com/qaq/base/annotation/CheckPermission.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.qaq.base.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface CheckPermission {
String value();
}
Loading

0 comments on commit e5feaea

Please sign in to comment.