Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e1c51fe
1 优化项目
uummuu Jan 8, 2018
e30d9e9
1 修改README
SeanDragon Jan 17, 2018
b097e05
1 修改README
SeanDragon Jan 17, 2018
d560cde
1 修改README
SeanDragon Jan 17, 2018
cc53445
1 修改README
SeanDragon Jan 17, 2018
1087436
1 修改README
SeanDragon Jan 17, 2018
1cabe92
1 修改README
SeanDragon Jan 17, 2018
5041338
1 clean install之后再使用
SeanDragon Jan 17, 2018
35963a6
1 clean install之后再使用
SeanDragon Jan 17, 2018
5e1d68e
Merge remote-tracking branch 'origin/protools'
SeanDragon Jan 17, 2018
04062fc
1 修改README
SeanDragon Jan 17, 2018
301dd0d
1 修改README
SeanDragon Jan 17, 2018
ab99162
1 自动编译
SeanDragon Jan 17, 2018
07d65d6
1 gson依赖修复
SeanDragon Jan 17, 2018
5cfc079
1 gson依赖修复
SeanDragon Jan 17, 2018
89e6f92
1 gson依赖修复
SeanDragon Jan 17, 2018
4854110
1 修改README
SeanDragon Jan 17, 2018
88507b1
1 修改README
SeanDragon Jan 17, 2018
e8a484e
1 修改README
SeanDragon Jan 17, 2018
aac512a
1 删除一些无用的代码
SeanDragon Jan 17, 2018
78efbd7
1 添增测试文件夹
SeanDragon Jan 17, 2018
e6f5764
1 更新README
SeanDragon Jan 17, 2018
bb6bac2
1 更新README
SeanDragon Jan 17, 2018
3f5332a
1 协议
SeanDragon Jan 17, 2018
281afe7
1 代码整理
SeanDragon Jan 17, 2018
58f6fa8
1 将一些提示信息变为中文
SeanDragon Jan 17, 2018
f85ae8f
1 修复ToolScript的问题
SeanDragon Jan 17, 2018
d04e032
1 更新gitignore
SeanDragon Jan 17, 2018
253c5c8
1 增添License和JDK版本的README信息
SeanDragon Jan 17, 2018
4505a64
1 增添License和JDK版本的README信息
SeanDragon Jan 17, 2018
fd2ab2c
1 增添License和JDK版本的README信息
SeanDragon Jan 17, 2018
c032b75
1 增添License和JDK版本的README信息
SeanDragon Jan 17, 2018
66c7ee6
1 跟进协议信息
SeanDragon Jan 17, 2018
2038e72
1 更新README
SeanDragon Jan 17, 2018
5beb80f
1 更新README
SeanDragon Jan 17, 2018
800a227
1 更新README
SeanDragon Jan 17, 2018
dc09df4
1 更新README
SeanDragon Jan 17, 2018
a00e2e5
1 更新README
SeanDragon Jan 24, 2018
5de9a34
1 更新README
SeanDragon Jan 24, 2018
75652f2
1 更新README
SeanDragon Jan 24, 2018
bc9cf9e
简单过了一遍阿里的规范手册,把一些显而易见的代码优化了。
SeanDragon Jan 25, 2018
f740ddb
1 更新README
SeanDragon Jan 25, 2018
3be54b7
1 更新README
SeanDragon Jan 25, 2018
56aff29
去除私库中的包,替换为官方包
SeanDragon Jan 25, 2018
09c4954
添加pom文件中的项目描述
SeanDragon Jan 25, 2018
9837a32
1 DatePlus中的注释的错误修改
SeanDragon Apr 1, 2018
9f2f5fd
添加图徽
SeanDragon May 4, 2018
ad26ed8
去除更新日志
SeanDragon May 4, 2018
b008ee4
1 将版本号提取到属性标签中
SeanDragon May 4, 2018
2ae1f34
Star OverTime
SeanDragon May 4, 2018
bddc521
1 上传国密算法中的SM2 SM3
SeanDragon Aug 2, 2018
eb1c184
优化二维码功能
SeanDragon Aug 24, 2018
5403bac
fix:
SeanDragon May 9, 2019
ac3e82d
Update README.md
SeanDragon Aug 3, 2019
fd592c8
Create codeql-analysis.yml
SeanDragon Nov 30, 2020
a232d97
Bump guava from 23.5-jre to 24.1.1-jre in /common
dependabot[bot] Jun 15, 2020
3f03c30
Bump netty.version from 4.1.17.Final to 4.1.50.Final in /http
dependabot[bot] Jun 15, 2020
efe487a
Bump junit from 4.12 to 4.13.1
dependabot[bot] Nov 30, 2020
35a55a9
Bump netty.version from 4.1.50.Final to 4.1.59.Final in /http
dependabot[bot] Feb 8, 2021
6a63d7b
Update README.md
SeanDragon Mar 9, 2021
42cfa68
Update README.md
SeanDragon Mar 9, 2021
c40865d
Bump guava from 24.1.1-jre to 29.0-jre in /common
dependabot[bot] Mar 31, 2021
87f132c
Update README.md
SeanDragon Jul 21, 2021
20b7447
Bump gson from 2.8.2 to 2.8.9 in /common
dependabot[bot] May 20, 2022
8d3276f
Bump junrar from 1.0.1 to 7.4.1 in /common
dependabot[bot] Feb 1, 2022
097922a
Bump netty-codec-http from 4.1.59.Final to 4.1.71.Final in /http
dependabot[bot] Dec 9, 2021
d642bf2
Bump bcprov-ext-jdk15on from 1.58 to 1.67 in /security
dependabot[bot] Aug 13, 2021
25abf0b
Bump netty-codec-http from 4.1.59.Final to 4.1.77.Final in /http
dependabot[bot] Sep 26, 2022
2306da4
Bump netty-codec-http from 4.1.77.Final to 4.1.86.Final in /http
dependabot[bot] Dec 12, 2022
b7fef60
Bump guava from 29.0-jre to 32.0.0-jre in /common
dependabot[bot] Jun 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '19 22 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,4 @@ hs_err_pid*
.idea/
target/
*.iml
logs/
.gitignore
logs/
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: java

java:
- 1.8

sudo: false

install:
- mvn clean install
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.

Copyright 2017 siter
Copyright 2018 SeanDragon

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
72 changes: 69 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,70 @@
# pro.tools:protools:2.0
# protools

# future
1 在面向对象思想上思考更多,多线程场景深入思考
[![Build Status](https://travis-ci.org/SeanDragon/protools.svg?branch=master)](https://travis-ci.org/SeanDragon/protools)
[![License](http://img.shields.io/:license-apache-blue.svg)](https://github.com/SeanDragon/protools/blob/master/LICENSE)
[![JDK 1.8](https://img.shields.io/badge/JDK-1.8-blue.svg)](#protools)

[![GitHub Forks](https://img.shields.io/github/forks/SeanDragon/protools.svg?style=flat&label=Fork)](https://github.com/SeanDragon/protools/fork)
[![GitHub Watchers](https://img.shields.io/github/watchers/SeanDragon/protools.svg?style=flat&label=Watch)](https://github.com/SeanDragon/protools/watchers)

<table border="0" width="10%">
<tr>
<td><img src="https://img1.github.io/tmp/1.jpg" height="80" width="82"></td>
<td><img src="https://img1.github.io/tmp/2.jpg" height="80" width="82"></td>
<td><img src="https://img1.github.io/tmp/3.jpg" height="80" width="82"></td>
</tr>
<tr>
<td><img src="https://img1.github.io/tmp/4.jpg" height="80" width="82"></td>
<td><a href="https://github.com/SeanDragon/protools"><img src="https://img.shields.io/github/stars/SeanDragon/protools.svg?style=social"></a></td>
<td><img src="https://img1.github.io/tmp/6.jpg" height="82" width="82"></td>
</tr>
<tr>
<td><img src="https://img1.github.io/tmp/7.jpg" height="82" width="82"></td>
<td><img src="https://img1.github.io/tmp/8.jpg" height="82" width="82"></td>
<td><img src="https://img1.github.io/tmp/9.jpg" height="82" width="82"></td>
</tr>
</table>

[![Stargazers Over Time](https://starcharts.herokuapp.com/SeanDragon/protools.svg)](https://starcharts.herokuapp.com/SeanDragon/protools)

历经开发周期两年,并且应用过千万级别项目的工具箱

大家如果想使用可以先执行 `mvn clean install` 即可在本地的其他 `maven` 项目中使用

## 开发计划
- 使用阿里的规范手册整理规范所有代码
- 将当时临时添加或欠缺考虑的命名或方法进行优化
- 将maven私人仓库转移到中心仓库
- 即将进行大升级,`Gradle` + `java module`

## 目录

- [protools](#protools)
- [common](#common)
- [http](#http)
- [mail](#mail)
- [security](#common)
- [all](#all)

### common
* 数据的处理
* 文件的处理
* script 引擎的封装
* 系统方面查询的封装
* 日期对象的封装DatePlus
* 数值对象的封装Decimal
### http
* 统一发送对象为HttpSend
* 统一接收对象为HttpReceive
* 三个版本的 http 客户端(Jdk、Netty 和 OkHttp)
### mail
* 封装 JavaMail,并采用了队列等方法提高性能,并简化了发送过程
### security
* 封装了 jdk 和 bouncycastle 中几十种常见加密方式
### all
* 如果需要使用上述多个模块,可以导入all模块以使用所有模块


### 感谢
- 感谢 **JetBrains** 对开源项目的支持<br/>
![输入图片说明](https://images.gitee.com/uploads/images/2020/0714/114152_d335c2f1_416720.png "jetbrains.png")
18 changes: 11 additions & 7 deletions protools/pom.xml → all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,46 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>parent</artifactId>
<artifactId>protools</artifactId>
<groupId>pro.tools</groupId>
<version>2.0</version>
<version>3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>protools</artifactId>
<artifactId>all</artifactId>

<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>pro.tools</groupId>
<artifactId>http</artifactId>
<version>2.0</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>pro.tools</groupId>
<artifactId>mail</artifactId>
<version>2.0</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>pro.tools</groupId>
<artifactId>security</artifactId>
<version>2.0</version>
<version>${project.version}</version>
</dependency>
</dependencies>

<properties>
<shade-plugin.version>1.4</shade-plugin.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.4</version>
<version>${shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
39 changes: 22 additions & 17 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>parent</artifactId>
<artifactId>protools</artifactId>
<groupId>pro.tools</groupId>
<version>2.0</version>
<version>3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -16,55 +16,49 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.9</version>
<version>${slf4j.version}</version>
</dependency>

<!--util-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<!--<version>21.0</version>-->
<version>23.5-jre</version>
<version>${guavav.version}</version>
</dependency>

<!--json-->
<!--<dependency>-->
<!--<groupId>com.google.code.gson</groupId>-->
<!--<artifactId>gson</artifactId>-->
<!--<version>2.8.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.google.code.gson</groupId>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.3</version>
<version>${gson.version}</version>
</dependency>

<!--barCode-->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.3.1</version>
<version>${zxing.version}</version>
</dependency>

<!--拼音-->
<dependency>
<groupId>com.belerweb</groupId>
<artifactId>pinyin4j</artifactId>
<version>2.5.1</version>
<version>${pinyin4j.version}</version>
</dependency>

<!--clone-->
<dependency>
<groupId>uk.com.robust-it</groupId>
<artifactId>cloning</artifactId>
<version>1.9.6</version>
<version>${cloning.version}</version>
</dependency>

<!--serialize-->
<dependency>
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
<version>2.56</version>
<version>${fst.version}</version>
<exclusions>
<exclusion>
<artifactId>objenesis</artifactId>
Expand All @@ -77,7 +71,7 @@
<dependency>
<groupId>com.github.junrar</groupId>
<artifactId>junrar</artifactId>
<version>0.7</version>
<version>${junrar.version}</version>
<exclusions>
<exclusion>
<artifactId>maven-scm-api</artifactId>
Expand All @@ -95,4 +89,15 @@
</dependency>
</dependencies>

<properties>
<junrar.version>7.4.1</junrar.version>
<fst.version>2.56</fst.version>
<cloning.version>1.9.6</cloning.version>
<pinyin4j.version>2.5.1</pinyin4j.version>
<zxing.version>3.3.1</zxing.version>
<gson.version>2.8.9</gson.version>
<guavav.version>32.0.0-jre</guavav.version>
<slf4j.version>1.7.9</slf4j.version>
</properties>

</project>
5 changes: 3 additions & 2 deletions common/src/main/java/pro/tools/constant/RegexConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
/**
* 正则的常量
*
* @author SeanDragon Create By 2017-04-17 10:13
* @author SeanDragon
* @date 2017-04-17 10:13
*/
public final class RegexConst {

Expand Down Expand Up @@ -114,7 +115,7 @@ public final class RegexConst {
public static final Pattern REGEX_NEGATIVE_FLOAT = compile("^-[1-9]\\d*\\.\\d*|-0\\.\\d*[1-9]\\d*$");

private RegexConst() {
throw new UnsupportedOperationException("u can't instantiate me...");
throw new UnsupportedOperationException("我是工具类,别初始化我。。。");
}
//endregion

Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/pro/tools/constant/StrConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public final class StrConst {

private StrConst() {
throw new UnsupportedOperationException("u can't instantiate me...");
throw new UnsupportedOperationException("我是工具类,别初始化我。。。");
}

/**
Expand Down
14 changes: 13 additions & 1 deletion common/src/main/java/pro/tools/constant/UnitConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public final class UnitConst {

private UnitConst() {
throw new UnsupportedOperationException("u can't instantiate me...");
throw new UnsupportedOperationException("我是工具类,别初始化我。。。");
}

//region 存储相关常量
Expand Down Expand Up @@ -50,9 +50,21 @@ private UnitConst() {
//endregion

public enum MemoryUnit {
/**
* 字节
*/
BYTE,
/**
* KB
*/
KB,
/**
* MB = 1024 * KB
*/
MB,
/**
* GB = 1024 * MB
*/
GB
}

Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/pro/tools/data/ToolSerialize.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class ToolSerialize {

private ToolSerialize() {
throw new UnsupportedOperationException("u can't instantiate me...");
throw new UnsupportedOperationException("我是工具类,别初始化我。。。");
}

private static FSTConfiguration CONFIGURATION = FSTConfiguration
Expand Down
Loading