Apache Commons
Apache Commons has many subprojects, some of which are commonly used as follows
BeanUtils
Provides a series of operations on Java beans, reading and setting property values, and so on
Map and bean conversions
We put the object in the cache using the Hash in Redis as follows
The utility classes for converting maps and beans to each other are particularly useful in this scenario
Codec
Common encoding, decoding method encapsulation
Collections
And so on
I/O
IOUtils Encapsulates I/O operations
FileUtils Encapsulates the file operation class
Lang
StringUtils the following assertion tests pass
Pair and Triple
When you want to return two or three values, but the values are not related and there is no need to wrap an object separately, you can use the following data structure to return a Pair or Triple object
Google Guava
Collection creation
Immutable collections are thread-safe and cannot be changed halfway through because methods like Add are declared expired and throw exceptions
A collection of hacking technologies
Two keys map to one value
There are many other collections of various types that are not covered
stop watch
View the running time of a piece of code
TimeUnit can specify the time precision
Joda Time
Prior to jdk1.8, the only date-manipulation classes in common use were java.util.Date and java.util.Calendar, but the usability of these two classes was so poor that SimpleDateFormat was not thread-safe. This forces users to choose third-party date manipulation classes, such as Joda Time. Later, Java itself realized this problem, so JDK1.8 borrowed a lot of Joda Time concept, launched a new date API, LocalDate, LocalTime, LocalDateTime, etc. We can see the following articles to know the usage, https://blog.csdn.net/zzti_erlie/article/details/100849192 API is similar to the two if the JDK version above 1.8 is recommended to use jdk1.8 the date of the new class, Joda Time is recommended if below 1.8.