Common utils for Java. Welcome to put your issues in issues.
Go to file
dependabot[bot] b168d1fb1f
Bump protobuf-java from 3.6.1 to 3.16.3
Bumps [protobuf-java](https://github.com/protocolbuffers/protobuf) from 3.6.1 to 3.16.3.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.6.1...v3.16.3)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 23:54:53 +00:00
.idea Merge branch 'master' of https://github.com/carolcoral/CommonUtil 2021-11-15 10:48:12 +08:00
src sync 2022-08-15 10:14:17 +08:00
_config.yml Set theme jekyll-theme-cayman 2019-11-21 16:34:27 +08:00
.DS_Store sync 2022-08-15 10:14:17 +08:00
.gitattributes Initial commit 2019-07-26 15:12:03 +08:00
.gitignore sync 2021-09-30 11:12:56 +08:00
CommonUtil.iml fix DateUtil 2021-11-15 11:31:32 +08:00
LICENSE Initial commit 2019-07-26 15:12:03 +08:00
pom.xml Bump protobuf-java from 3.6.1 to 3.16.3 2022-10-04 23:54:53 +00:00
README.md fix 2021-11-19 23:45:49 +08:00

CommonUtil

  • Desc: A common utils jar for using redis elasticsearch Rest and file even more these.

WIKI

Download

Log

2021-10-29 13:51:03 add and fix some methods.Update version to 2.1.0.

2021-3-24 11:24:53 fix some bugs and change mongoClient init. Use MongoClientInit.

2021-2-9 11:09:13 change folder and fix some bug.

2020-8-20 16:49:23 new class MongoClientsInit for create muti mongoClient.More info to see How to use MongoClientsInit

2020-7-21 11:20:14 fix some expire bug from RedisUtil.

2020-7-20 14:17:00 New date function String formatDateByReg(String date_format, int parseInt) for format date by The date-format DateUtil .For example like this:

public static void main(String[] args) {
    List<String> date_list = Arrays.asList(
            "YYYY",
            "YYYY-MM",
            "YYYY-MM-dd",
            "YYYY-MM-dd HH",
            "YYYY-MM-dd HH:mm",
            "YYYY-MM-dd HH:mm:ss"
    );
    int parseInt = -1;
    for (String date_format : date_list) {
        System.out.println("current date_format is: "+date_format);
        String formatDateByReg = formatDateByReg(date_format, parseInt);
        System.out.println("current format result is:"+formatDateByReg);
    }
}
current date_format is: YYYY
current format result is:2019
current date_format is: YYYY-MM
current format result is:2020-06
current date_format is: YYYY-MM-dd
current format result is:2020-07-19
current date_format is: YYYY-MM-dd HH
current format result is:2020-07-20 13
current date_format is: YYYY-MM-dd HH:mm
current format result is:2020-07-20 14:14
current date_format is: YYYY-MM-dd HH:mm:ss
current format result is:2020-07-20 14:15:08

2019-12-27 17:20:34 Demo to show how to operation Protobuf in java.Java中使用ProtoBuf数据

2019-12-05 14:33:23 New class for remotely connect to the server and execute the script.SSH2Util

How to use

Import it in your pom

Import jar into your maven

mvn install:install-file -Dfile=<path-to-file> -DgroupId=site.cnkj -DartifactId=CommonUtil -Dversion=1.0 -Dpackaging=jar

Note: is your local jar of full path.

For example:

mvn install:install-file -Dfile=/User/carol/Desktop/CommonUtil-1.0.jar -DgroupId=site.cnkj -DartifactId=CommonUtil -Dversion=1.0 -Dpackaging=jar

Import dependency into your pom.xml

<dependency>
    <groupId>site.cnkj</groupId>
    <artifactId>CommonUtil</artifactId>
    <version>2.0.2</version>
</dependency>