Skip to content

Commit 2369b2e

Browse files
authored
Merge branch 'main' into feature-validator
2 parents 3bf939b + e3182dc commit 2369b2e

File tree

48 files changed

+1404
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1404
-145
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ target/
3838
### fleet
3939
.fleet
4040

41+
42+
.flattened-pom.xml
43+

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ Summer is a minimized AOP and IoC kernel toolset. It provides a lightweight and
5454
- **summer-beans**: Core module for bean management, including bean definition, creation, and dependency injection. It also supports AOP features such as proxy creation and advice execution.
5555
- **summer-validator**: A validation module that provides various validation rules for collections and objects.
5656

57+
Summer is a minimized AOP (Aspect-Oriented Programming) and IoC (Inversion of Control) kernel tool library. It provides a set of validators and related utility classes to simplify the validation logic of objects and collections. Additionally, it includes some functions for batch task processing.
58+
59+
### Validation Module
60+
61+
+ **Rich Validation Rules**: The validation module offers a wide range of validation rules, including length checks, regular expression matching, and
62+
collection size validations. For example, you can easily validate strings for minimum and maximum lengths, and collections for size ranges.
63+
64+
+ **Annotation-Based Validation**: Supports annotation-based validation. You can use custom annotations to mark fields in classes and perform
65+
validation operations on objects. For instance, use the @NotNull and @Pattern annotations to validate user-defined objects.
66+
67+
+ **Collection Validation**: Provides specific validation capabilities for collections. You can set validation rules for the entire collection as
68+
well
69+
as for each element in the collection.
70+
71+
72+
### Batch Task Processing Module
73+
74+
+ **Main and Sub-Task Management**: Includes entities such as MainTask and SubTask, and corresponding data access objects (MainTaskDao). It can
75+
manage
76+
the status, progress, and related information of main and sub-tasks.
77+
78+
+ **Task Monitoring and Recovery**: The TaskWatchdog class periodically checks for stuck tasks and attempts to recover them, ensuring the reliability
79+
of task processing.
80+
5781
## Getting Started
5882

5983
### Prerequisites
@@ -70,6 +94,21 @@ cd summer
7094

7195
2. Build the project using Maven:
7296
```shell
97+
Make sure you have Java and Maven installed in your development environment.
98+
99+
### Installation
100+
101+
Clone the repository to your local machine:
102+
103+
```bash
104+
git clone https://github.com/dianpoint/summer.git
105+
106+
```
107+
108+
Navigate to the project directory and build the project:
109+
110+
```bash
111+
cd summer
73112
mvn clean install
74113
```
75114

@@ -221,3 +260,54 @@ Summer is distributed under the Apache License 2.0 License. See License.txt for
221260
### Contact
222261
+ Email: congccoder@gmail.com
223262
+ Github: https://github.com/ccoderJava
263+
## Usage
264+
265+
## Roadmap
266+
267+
- [x] xxx
268+
- [x] xxx
269+
- [ ] xxx
270+
- [ ] xxx
271+
- [ ] xxx
272+
- [ ] xxx
273+
274+
See the [issues](https://github/dianpoint/summer/issues) for a full list of proposed features and known issues.
275+
276+
## Contributing
277+
278+
## License
279+
280+
`Summer` distributed under the [`Apache License 2.0`](https://github.com/dianpoint/summer/blob/main/LICENSE) License.
281+
See `License.txt` for more information.
282+
283+
## Contact
284+
285+
+ Email: [congccoder@gmail.com](mailto://congccoder@gmail.com)
286+
+ Github: [https://github.com/ccoderJava](https://github.com/ccoderJava)
287+
288+
[//]: # (Markdown Links & Images)
289+
290+
[contributors-shield]: https://img.shields.io/github/contributors/dianpoint/summer.svg?style=for-the-badge
291+
292+
[contributors-url]: https://github.com/dianpoint/summer/graphs/contributors
293+
294+
[forks-shield]: https://img.shields.io/github/forks/dianpoint/summer.svg?style=for-the-badge
295+
296+
[forks-url]: https://github.com/dianpoint/summer/forks
297+
298+
[stars-shield]: https://img.shields.io/github/stars/dianpoint/summer.svg?style=for-the-badge
299+
300+
[stars-url]: https://github.com/dianpoint/summer/stargazers
301+
302+
[issues-shield]: https://img.shields.io/github/issues/dianpoint/summer.svg?style=for-the-badge
303+
304+
[issues-url]: https://github.com/dianpoint/summer/issues
305+
306+
[license-shield]: https://img.shields.io/github/license/dianpoint/summer.svg?style=for-the-badge
307+
308+
[license-url]: https://github.com/dianpoint/summer/blob/main/LICENSE
309+
310+
[language-shield]: https://img.shields.io/github/languages/count/dianpoint/summer?style=for-the-badge
311+
312+
[language-url]: https://img.shields.io/github/languages/count/dianpoint/summer
313+

README_cn.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,46 @@
4141
<!-- TOC -->
4242

4343
## 项目简介
44+
Summer 是一个最小化的 AOP(面向切面编程)和 IoC(控制反转)内核工具库。它提供了一系列的验证器和相关工具类,用于简化对象和集合的验证逻辑,同时也包含了一些批量任务处理的功能。
45+
46+
### 验证模块 | Validation Module
47+
48+
+ **丰富的验证规则**:验证模块提供了广泛的验证规则,包括长度检查、正则表达式匹配和集合大小验证。例如,您可以轻松验证字符串的最小和最大长度,以及集合的大小范围。
49+
50+
+ **基于注解的验证**:支持基于注解的验证。您可以使用自定义注解标记类中的字段,并对对象执行验证操作。例如,使用 @NotNull@Pattern 注解来验证用户定义的对象。
51+
52+
+ **集合验证**:为集合提供特定的验证功能。您可以为整个集合以及集合中的每个元素设置验证规则。
53+
54+
55+
### 批量任务处理模块 | Batch Task Processing Module
56+
57+
+ **主任务和子任务管理**:包括 MainTask 和 SubTask 等实体,以及相应的数据访问对象 (MainTaskDao)。它可以管理主任务和子任务的状态、进度和相关信息。
58+
59+
+ **任务监控和恢复**:TaskWatchdog 类会定期检查卡住的任务并尝试恢复它们,确保任务处理的可靠性。
4460

4561
## 入门指南
4662

4763
### 预备知识
4864

65+
确保您的开发环境中已经安装了 Java 和 Maven。
66+
4967
### 安装
5068

69+
克隆该仓库到本地:
70+
71+
```bash
72+
git clone https://github.com/dianpoint/summer.git
73+
74+
```
75+
76+
进入项目目录并构建项目:
77+
78+
```bash
79+
cd summer
80+
mvn clean install
81+
```
82+
83+
5184
## 用法
5285

5386
## 计划

check-codestyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<!--org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=Java:SPACE_BEFORE_COMMA-->
1010
<!--org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=Java:SPACE_BEFORE_COMMA
1111
由于IDEA只有一个SPACE_BEFORE_COMMA选项,所以统一设置 insert_space_before_comma 为 do not insert
12+
1213
-->
1314
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters"
1415
value="do not insert"/>

pom.xml

Lines changed: 75 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -3,108 +3,92 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>io.github.dianpoint</groupId>
8+
<artifactId>summer-build</artifactId>
9+
<version>0.1.0-SNAPSHOT</version>
10+
</parent>
611

7-
<groupId>com.dianpoint.summer</groupId>
12+
13+
14+
<groupId>io.github.dianpoint</groupId>
815
<artifactId>summer</artifactId>
9-
<version>0.1-SNAPSHOT</version>
16+
<version>${revision}</version>
1017
<packaging>pom</packaging>
11-
<modules>
12-
<module>summer-beans</module>
13-
<module>summer-validator</module>
14-
</modules>
18+
19+
20+
21+
<name>Summer</name>
22+
<description>Summer Projects for Java</description>
23+
<url>https://github.com/dianpoint/summer</url>
24+
25+
26+
<organization>
27+
<name>DianPoint</name>
28+
<url>https://github.com/dianpoint</url>
29+
</organization>
30+
31+
<licenses>
32+
<license>
33+
<name>The Apache License, Version 2.0</name>
34+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
35+
</license>
36+
</licenses>
37+
38+
<developers>
39+
<developer>
40+
<id>ccoderJava</id>
41+
<name>congccoder</name>
42+
<email>congccoder@gmail.com</email>
43+
<organization>DianPoint</organization>
44+
<roles>
45+
<role>lead</role>
46+
<role>architect</role>
47+
<role>developer</role>
48+
</roles>
49+
</developer>
50+
</developers>
51+
52+
<scm>
53+
<url>git@github.com:dianpoint/summer.git</url>
54+
<connection>scm:git:${project.scm.url}</connection>
55+
<developerConnection>scm:git:ssh://${project.scm.url}</developerConnection>
56+
</scm>
1557

1658
<properties>
17-
<maven.compiler.source>8</maven.compiler.source>
18-
<maven.compiler.target>8</maven.compiler.target>
19-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20-
<fasterxml.jackson.version>2.14.2</fasterxml.jackson.version>
21-
<servlet-api.version>2.5</servlet-api.version>
59+
<revision>0.1.0-SNAPSHOT</revision>
2260
</properties>
2361

24-
<dependencyManagement>
25-
<dependencies>
26-
<!-- https://mvnrepository.com/artifact/org.dom4j/dom4j -->
27-
<dependency>
28-
<groupId>org.dom4j</groupId>
29-
<artifactId>dom4j</artifactId>
30-
<version>2.1.4</version>
31-
</dependency>
32-
<dependency>
33-
<groupId>com.fasterxml.jackson.core</groupId>
34-
<artifactId>jackson-core</artifactId>
35-
<version>${fasterxml.jackson.version}</version>
36-
</dependency>
37-
<dependency>
38-
<groupId>com.fasterxml.jackson.core</groupId>
39-
<artifactId>jackson-databind</artifactId>
40-
<version>${fasterxml.jackson.version}</version>
41-
</dependency>
42-
<dependency>
43-
<groupId>com.fasterxml.jackson.core</groupId>
44-
<artifactId>jackson-annotations</artifactId>
45-
<version>${fasterxml.jackson.version}</version>
46-
</dependency>
47-
<dependency>
48-
<groupId>com.fasterxml.jackson.datatype</groupId>
49-
<artifactId>jackson-datatype-jdk8</artifactId>
50-
<version>${fasterxml.jackson.version}</version>
51-
</dependency>
52-
<dependency>
53-
<groupId>com.fasterxml.jackson.datatype</groupId>
54-
<artifactId>jackson-datatype-jsr310</artifactId>
55-
<version>${fasterxml.jackson.version}</version>
56-
</dependency>
57-
<!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
58-
<dependency>
59-
<groupId>javax.servlet</groupId>
60-
<artifactId>servlet-api</artifactId>
61-
<version>${servlet-api.version}</version>
62-
<scope>provided</scope>
63-
</dependency>
64-
65-
66-
<!--test-->
67-
<dependency>
68-
<groupId>junit</groupId>
69-
<artifactId>junit</artifactId>
70-
<version>4.13.2</version>
71-
<scope>test</scope>
72-
</dependency>
73-
<dependency>
74-
<groupId>org.assertj</groupId>
75-
<artifactId>assertj-core</artifactId>
76-
<version>3.24.2</version>
77-
<scope>test</scope>
78-
</dependency>
79-
</dependencies>
80-
</dependencyManagement>
81-
82-
<build>
83-
<plugins>
84-
<plugin>
85-
<groupId>org.apache.maven.plugins</groupId>
86-
<artifactId>maven-compiler-plugin</artifactId>
87-
<version>3.11.0</version>
88-
<configuration>
89-
<source>1.8</source>
90-
<target>1.8</target>
91-
<encoding>UTF-8</encoding>
92-
</configuration>
93-
</plugin>
94-
<plugin>
95-
<groupId>org.apache.maven.plugins</groupId>
96-
<artifactId>maven-source-plugin</artifactId>
97-
<version>3.2.1</version>
98-
</plugin>
99-
</plugins>
100-
</build>
62+
<modules>
63+
<module>summer-beans</module>
64+
<module>summer-validator</module>
65+
<module>summer-engines</module>
66+
<module>summer-java-core</module>
67+
<module>summer-parent</module>
68+
</modules>
10169

10270
<distributionManagement>
71+
<snapshotRepository>
72+
<id>ossrh</id>
73+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
74+
</snapshotRepository>
10375
<repository>
104-
<id>github</id>
105-
<name>GitHub Packages</name>
106-
<url>https://maven.pkg.github.com/dianpoint/summer</url>
76+
<id>ossrh</id>
77+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
10778
</repository>
10879
</distributionManagement>
10980

81+
<repositories>
82+
<repository>
83+
<id>snapshot</id>
84+
<snapshots>
85+
<enabled>true</enabled>
86+
</snapshots>
87+
<releases>
88+
<enabled>false</enabled>
89+
</releases>
90+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
91+
</repository>
92+
</repositories>
93+
11094
</project>

0 commit comments

Comments
 (0)