A set of tools that keep Java sweet.
-- Homepage: http://hutool.cn/ --
-- QQ Group ②: 871141901 --
Introduction
Hutool is a Java toolkit, and just a toolkit. It helps us simplify every line of code, reduce every method, and make the Java language "sweet". Hutool was originally a reorganization of the "util" package in my project, and over time it accumulated and incorporated more non-business-related functions, extensively learning from the essence of other open-source projects. After my own reorganization and modification, it eventually formed this rich open-source toolkit.
Hutool is a coined word combining "Hu" + "tool". The former pays tribute to my "previous company", the latter means "tool". Phonetically similar to "hutu" (糊涂) in Chinese, which means "muddle-headed", conveying the pursuit of the state of "treating everything as muddle-headed, neither losing nor gaining".
Included Components
A Java basic utility class that encapsulates JDK methods such as file, stream, encryption/decryption, transcoding, regex, thread, XML, etc., forming various Util tool classes. Additionally, the following components are provided:
- hutool-aop JDK dynamic proxy encapsulation, providing aspect support without IOC
- hutool-bloomFilter Bloom filter, providing Bloom filters with some hash algorithms
- hutool-cache Cache
- hutool-core Core, including Bean operations, date, various Util, etc.
- hutool-cron Scheduled task module, providing cron-like scheduled tasks
- hutool-crypto Encryption/decryption module
- hutool-db Data operations after JDBC encapsulation, based on ActiveRecord thought
- hutool-dfa Multi-keyword search based on DFA model
- hutool-extra Extension module, encapsulating third-party libraries (template engines, email, Servlet, QR codes, etc.)
- hutool-http HTTP client encapsulation based on HttpUrlConnection
- hutool-log Log facade that automatically identifies logging implementation
- hutool-script Script execution encapsulation, e.g., Javascript
- hutool-setting More powerful Setting configuration file and Properties encapsulation
- hutool-system System parameter invocation encapsulation (JVM info, etc.)
- hutool-json JSON implementation
- hutool-captcha Image captcha implementation
Documentation
Chinese Documentation
Reference API
Installation
Maven
Add the following to the dependencies section of your project's pom.xml:
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.1.11</version>
</dependency>
Gradle
compile 'cn.hutool:hutool-all:4.1.11'
Non-Maven Projects
Click either of the following links to download hutool-all-X.X.X.jar:
Version Changes
Contributing
Report Bugs or Suggestions
Guidelines
Hutool welcomes anyone to contribute code. However, the author is a perfectionist, so to accommodate this, pull requests (PRs) need to meet the following criteria:
- Complete comments: each new method should be documented in Java document format explaining the method, parameters, return value, etc. You may also add your name if you wish.
- Hutool uses Eclipse (don't argue about IDEA; the author is very lazy and hasn't learned it) default (tab) indentation. Please adhere to this (do not argue about spaces vs tabs; this is a habit of a patient person).
- New methods should not use third-party libraries. Hutool follows a zero-dependency principle (except for methods in the extra module).
- Please submit pull requests to the
v4-dev branch. Hutool introduced new branches starting from version 4.x: v4-master is the main branch for released versions on Maven Central — no PRs or modifications are allowed on this branch. v4-dev is the development branch for the next version or SNAPSHOT versions; you can submit PRs to this branch.
Steps to Contribute Code
- Fork the project on Gitee or Github to your own repo.
- Clone the forked project (your repo) to your local machine.
- Modify the code (make sure to work on the
v4-dev branch).
- Commit and push to your own repo (
v4-dev branch).
- Log in to Gitee or Github, you will see a pull request button on your homepage. Click it, fill in some explanatory information, and submit.
- Wait for the author to merge.
Donation
If you think Hutool is great, you can donate to buy the author a bag of spicy strips~. Thank you in advance! ^_^
Click the link below, scroll to the bottom of the page, and click "Donate".
Go to Donate