Skip to content

Commit 8e00ac3

Browse files
committed
Initial commit
0 parents  commit 8e00ac3

File tree

21 files changed

+708
-0
lines changed

21 files changed

+708
-0
lines changed

Diff for: .coveralls.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
service_name: travis-ci

Diff for: .gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# maven ignore
2+
target/
3+
*.jar
4+
*.war
5+
*.zip
6+
*.tar
7+
*.tar.gz
8+
9+
# eclipse ignore
10+
.settings/
11+
.project
12+
.classpath
13+
14+
# idea ignore
15+
.idea/
16+
*.ipr
17+
*.iml
18+
*.iws
19+
20+
# temp ignore
21+
*.log
22+
*.cache
23+
*.diff
24+
*.patch
25+
*.tmp
26+
*.java~
27+
*.properties~
28+
*.xml~
29+
30+
# system ignore
31+
.DS_Store
32+
Thumbs.db
33+

Diff for: .travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: java
2+
jdk:
3+
- oraclejdk8
4+
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true
5+
script: mvn test
6+
after_success:
7+
- mvn clean cobertura:cobertura coveralls:report

Diff for: README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 项目简介
2+
3+
基于注解的 Java 异步处理框架。
4+
5+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.houbb/async/badge.svg)](http://mvnrepository.com/artifact/com.github.houbb/async)
6+
[![Build Status](https://www.travis-ci.org/houbb/async.svg?branch=master)](https://www.travis-ci.org/houbb/async?branch=master)
7+
[![Coverage Status](https://coveralls.io/repos/github/houbb/async/badge.svg?branch=master)](https://coveralls.io/github/houbb/async?branch=master)
8+

Diff for: async-api/pom.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>async</artifactId>
7+
<groupId>com.github.houbb</groupId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>async-api</artifactId>
13+
<description>The api module of async project.</description>
14+
15+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.github.houbb.async.api.annotation;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* 当方法添加这个注解的时候,则实际进行异步执行。
7+
* 1. 如果放在方法上,则当前方法会进行异步执行
8+
* 2. 如果放在类上,则当前类下面的所有方法都进行异步处理。
9+
*
10+
* 实现原理:基于 CGLIB 实现代理,基于 aop 实现方法的切面处理。
11+
* 基于线程池实现真正的任务处理。
12+
* @author binbin.hou
13+
* @since 0.0.1
14+
*/
15+
@Inherited
16+
@Documented
17+
@Target({ElementType.METHOD, ElementType.TYPE})
18+
@Retention(RetentionPolicy.RUNTIME)
19+
public @interface Async {
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package com.github.houbb.async.api.annotation;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package com.github.houbb.async.api;

Diff for: async-core/pom.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>async</artifactId>
7+
<groupId>com.github.houbb</groupId>
8+
<version>0.0.1-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>async-core</artifactId>
13+
<description>The core module of async project.</description>
14+
15+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package com.github.houbb.async.core;

Diff for: cgit.bat

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:: 用于提交当前变更(windows)
2+
:: author: houbb
3+
:: LastUpdateTime: 2018-11-22 09:08:52
4+
:: 用法:双击运行,或者当前路径 cmd 直接输入 .\cgit.bat
5+
6+
git pull
7+
git add .
8+
git commit -m "[Feature] add for new"
9+
git push
10+
git status
11+

Diff for: cgit.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 提交
2+
3+
git pull
4+
git add .
5+
git commit -m "[Feature] add for new"
6+
git push
7+
git status
8+
9+
# 1. 赋值权限: chmod +x ./cgit.sh
10+
# 2. 执行: ./cgit.sh
11+
# Last Update Time: 2018-11-21 21:55:38
12+
# Author: houbb

Diff for: doc/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 变更日志
2+
3+
| 类型 | 说明 |
4+
|:----|:----|
5+
| A | 新增 |
6+
| U | 更新 |
7+
| D | 删除 |
8+
| T | 测试 |
9+
| O | 优化 |
10+
| F | 修复BUG |
11+
12+
# release_0.0.1
13+
14+
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
15+
|:---|:---|:---|:---|:--|
16+
| 1 | A | 常见基础实现 | 2019-02-20 21:40:43 | |
17+

Diff for: doc/CI集成.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 文档说明
2+
3+
作者:侯宾宾
4+
5+
时间:2018-04-24 10:11:43
6+
7+
说明:如何进行项目的持续集成+测试覆盖率
8+
9+
# Travis-CI
10+
11+
[https://www.travis-ci.org](https://www.travis-ci.org) 直接添加此项目
12+
13+
# Coveralls
14+
15+
- 添加项目
16+
17+
[https://coveralls.io/repos/new](https://coveralls.io/repos/new) 直接添加项目
18+
19+
- 生成密匙
20+
21+
```
22+
travis encrypt COVERALLS_TOKEN=${your_repo_token}
23+
```
24+
25+
- 添加到文件
26+
27+
```
28+
travis encrypt COVERALLS_TOKEN=${your_repo_token} --add
29+
```
30+

Diff for: doc/issues/v0.0.1.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 添加 aop 基本实现。

Diff for: doc/发布流程.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# 文档说明
2+
3+
本文档用于说明当前项目如何进行发布。
4+
5+
6+
# 发布流程
7+
8+
## push to mvn center
9+
10+
```
11+
mvn clean deploy -P release
12+
```
13+
14+
## commit to github
15+
16+
```
17+
git push
18+
```
19+
20+
## merge to master
21+
22+
```
23+
git checkout master
24+
git pull
25+
git checkout branch
26+
git rebase master (用rebase合并主干的修改,如果有冲突在此时解决)
27+
git checkout master
28+
git merge branch
29+
git push
30+
```
31+
32+
## create new branch & checkout
33+
34+
```
35+
git branch release_XXX
36+
git checkout release_XXX
37+
```
38+
39+
## modify project version
40+
41+
```
42+
mvn versions:set -DgroupId=com.github.houbb -DartifactId=paradise* -DoldVersion=1.1.2 -DnewVersion=1.1.3-SNAPSHOT-->
43+
mvn -N versions:update-child-modules
44+
mvn versions:commit
45+
```
46+

Diff for: doc/版本迭代规范.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 版本类型
2+
3+
x.y.z
4+
5+
x 表示大版本之间的迭代,可能出现前后的不兼容。
6+
7+
y 表示新特性,每次新加一个新特性,都会提升 y 的版本号。
8+
9+
z 表示修复版本号,如果为第一版,则 z=1。后续会依次提升。
10+
11+
## 使用的版本选择
12+
13+
如果在较为正式的环境使用,建议使用 x.y 相同,z 数值最大的版本。
14+
15+
因为这个版本为尽可能修复已知的 bug。
16+
17+
## 新特性
18+
19+
不同版本的新特性,参见变更日志。
20+
21+
# 版本的兼容性
22+
23+
在同一个 x 大版本中,禁止直接删除类信息。
24+
25+
所有的废弃使用 `@Depretectd` 注解、
26+
27+
## 必须有对应的测试
28+
29+
对应的测试信息。
30+
31+
保证代码的正确性。

Diff for: doc/项目原型.md

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# 原型创建
2+
3+
- create
4+
5+
```
6+
$ mvn archetype:create-from-project
7+
```
8+
9+
- config
10+
11+
```
12+
~/target/generated-sources/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
13+
```
14+
15+
[archetype-descriptor](http://maven.apache.org/archetype/archetype-models/archetype-descriptor/archetype-descriptor.html)
16+
17+
# 文件内容
18+
19+
`~/maven-archetype/target/generated-sources/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml`
20+
21+
22+
```xml
23+
<?xml version="1.0" encoding="UTF-8"?>
24+
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="maven-archetype"
25+
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
26+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
27+
<fileSets>
28+
29+
<fileSet encoding="UTF-8">
30+
<directory></directory>
31+
<includes>
32+
<include>README.md</include>
33+
<include>release.sh</include>
34+
<include>release_rm.sh</include>
35+
<include>.coveralls.yml</include>
36+
<include>.travis.yml</include>
37+
<include>.gitignore</include>
38+
<include>LICENSE.txt</include>
39+
</includes>
40+
</fileSet>
41+
42+
<fileSet packaged="true" encoding="UTF-8">
43+
<directory>src/main/java</directory>
44+
<includes>
45+
<include>**/*.md</include>
46+
</includes>
47+
</fileSet>
48+
<fileSet encoding="UTF-8">
49+
<directory>src/main/resources</directory>
50+
<includes>
51+
<include>**/*.md</include>
52+
</includes>
53+
</fileSet>
54+
<fileSet encoding="UTF-8">
55+
<directory>src/test/java</directory>
56+
<includes>
57+
<include>**/*.md</include>
58+
</includes>
59+
</fileSet>
60+
61+
<fileSet encoding="UTF-8">
62+
<directory>doc</directory>
63+
<includes>
64+
<include>**/*.md</include>
65+
</includes>
66+
</fileSet>
67+
68+
</fileSets>
69+
</archetype-descriptor>
70+
```
71+
72+
- install
73+
74+
```
75+
$ cd target/generated-sources/archetype/
76+
$ mvn install
77+
```
78+
79+
80+
- use
81+
82+
```
83+
$ mkdir /tmp/archetype
84+
$ cd /tmp/archetype
85+
$ mvn archetype:generate -DarchetypeCatalog=local
86+
```
87+
88+
## 注意
89+
90+
`.gitignore` 文件默认没有添加,需要手动添加。
91+
92+
`*.iml` 文件是多余的,手动删除
93+
94+
95+
96+
97+

0 commit comments

Comments
 (0)