Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common class libraries used by Java developers

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces "what are the common class libraries of Java developers". In the daily operation, I believe that many people have doubts about the common class libraries of Java developers. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "what are the common class libraries of Java developers?" Next, please follow the editor to study!

Application development scaffolding

1.Spring Framework

Spring framework provides a comprehensive programming and configuration model for modern enterprise applications based on Java, and it is more simple and convenient to develop applications based on Java language.

Github: https://github.com/spring-projects/spring-framework/

Official website: https://spring.io/projects/spring-framework

2.Spring Boot

Spring Boot makes it very easy to create stand-alone, Spring-based production-level applications.

Official website: https://spring.io/projects/spring-boot

3.Spring Cloud Spring Cloud provides developers with a wealth of tools based on which developers can quickly build some common functions in distributed systems (such as configuration management, service discovery, circuit breakers, intelligent routing, micro-agents, control buses, one-time tokens, global locks, leadership elections, distributed sessions, etc.).

Official website: https://spring.io/projects/spring-cloud

Web service interface

1.Jersey

Jersey is a REST framework that provides JAX-RS reference implementations, and so on. Jersey provides its own api, which extends the JAX-RS toolkit with additional features and utilities, further simplifying RESTful services and client development. Jersey also exposes a number of extension spi so that developers can extend Jersey to best suit their needs.

Github: https://github.com/eclipse-ee4j/jersey

2.Spring Web MVC

Spring Web MVC is the original Web framework based on Servlet API, which has been included in the Spring framework from the very beginning. The official name "Spring Web MVC" comes from the name of its source module (spring-webmvc), but is usually referred to as "Spring MVC".

Official website: https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/web.html

Data persistence framework

1.MyBatis

MyBatis is a state-of-the-art persistence framework that supports custom SQL, stored procedures, and advanced mapping, which almost eliminates JDBC code, manual parameter settings, and result retrieval. MyBatis can be configured with simple XML or annotations and map primitives, interfaces, and javapojo (plain old Java objects) to database records.

Official website: https://mybatis.org/mybatis-3/

Github: https://github.com/mybatis/mybatis-3

2.Hibernate

Hibernate is an open source object-relational mapping framework, which encapsulates JDBC with very lightweight objects. It establishes a mapping relationship between POJO and database tables, and is a fully automatic orm framework. Hibernate can automatically generate SQL statements and execute them automatically, so that Java programmers can use object programming thinking to manipulate the database at will.

Official website: http://hibernate.org/

Excel read and write

1.Alibaba EasyExcel

Java parsing and generating Excel are well-known frameworks such as Apache poi and jxl. However, they all have a serious problem, that is, they consume a lot of memory. Poi has a set of API in SAX mode that can solve some memory overflow problems to some extent, but POI still has some defects. For example, the decompression and storage of 07 version Excel are all done in memory, and the memory consumption is still very large. Easyexcel rewrites poi's parsing of 07 version of Excel. It is possible that a 3M excel still needs about 100m of memory to use POI sax to reduce to a few megabytes of memory, and no memory overflow occurs in a large excel. Version 03 relies on POI's sax mode. The model transformation is encapsulated in the upper layer, which makes the user more simple and convenient.

Github: https://github.com/alibaba/easyexcel

2.Apache POI

A Java library for reading and writing Microsoft Office binary and OOXML file formats, which can be used to read and write Excel 97-2008.

Github: https://github.com/apache/poi

CSV read and write

1.Apache Commons CSV

The Apache Commons CSV library provides an interface for reading and writing to various types of CSV files.

Github: https://github.com/apache/commons-csv

2.Java CSV

Java CSV is a small, fast and open source Java library for reading and writing various CSV files.

Official website: https://www.csvreader.com/java_csv.php

API: http://javacsv.sourceforge.net/

3.Super CSV

Super CSV is a fast, free cross-platform CSV format data read and write library, which can easily deal with object, Map, list read and write operations, as well as automatic type conversion and data checking functions.

Official website: http://super-csv.github.io/super-csv/index.html

Github: https://github.com/super-csv/super-csv

JSON read and write

1.Jackson

Jackson is known as Java's standard JSON library and "the best JSON parser for Java".

Github: https://github.com/FasterXML/jackson

2.Gson

Gson is an open source Java library from Google that can be used to convert Java objects into their JSON representations. It can also be used to convert JSON strings into equivalent Java objects. Gson can handle any Java object, including existing objects that you don't have source code for.

Github: https://github.com/google/gson

3.fastjson

Fastjson is Alibaba's open source JSON parsing library, which can parse strings in JSON format, support serialization of JavaBean into JSON strings, and deserialize from JSON strings to JavaBean.

Github: https://github.com/alibaba/fastjson

XML read and write

1.dom4j

Dom4j is an open source framework for dealing with XML that is integrated with XPath and fully supports the DOM, SAX, JAXP, and Java platforms.

Github: https://github.com/dom4j/dom4j

Official website: https://dom4j.github.io/

2.StAX

The full name of StAX is Streaming API for XML, a new stream-based standard class library for Java XML parsing.

3.jaxb-api

Jaxb-api is used to perform mapping between XML documents and Java objects.

Documentation: https://docs.oracle.com/javase/8/docs/api/javax/xml/bind/JAXB.html

4.XStream

XStream is a class library that can easily convert Java objects to and from xml documents.

Official website: http://x-stream.github.io/

IO read and write

1.Apache Commons IO Apache Commons IO is a utility library that assists in the development of IO features.

Official website: https://commons.apache.org/proper/commons-io/

2.Okio

Okio complements java.io and java.nio, making it easier to access, store, and process data.

Github: https://github.com/square/okio

HTTP client

1.OkHttp

OkHttp is a HTTP client, it is easy to use OkHttp, and its request / response API has a smooth builder and immutability. It supports synchronous blocking calls and asynchronous calls with callbacks.

Github: https://github.com/square/okhttp

Official website: https://square.github.io/okhttp/

2.Apache HttpClient

Apache HttpClient provides strong support for the basic HTTP protocol for building HTTP-based clients.

Official website: http://hc.apache.org/index.html

Github: https://github.com/apache/httpcomponents-client

Java Bean replication

1.Cglib BeanCopier

BeanCopier in the Cglib library provides ava Bean-to-Java Bean replication with better performance than Spring BeanUtils.

BeanCopier beanCopier = BeanCopier.create (sourceClass, targetClass, false); beanCopier.copy (source, target, null)

2.Spring BeanUtils

BeanUtils in the Spring Beans library of the Spring framework also implements Java Bean-to-Java Bean replication.

3.Dozer

Dozer is a Java Bean-to-Java Bean mapper that copies data recursively from one object to another. Dozer supports simple attribute mapping, complex type mapping, bidirectional mapping, implicit explicit mapping, and recursive mapping. Dozer not only supports mapping between attribute names, but also automatically converts between types. Most conversion scenarios are supported right out of the box, while allowing you to specify custom transformations through XML or code-based configuration.

Github: https://github.com/DozerMapper/dozer

Documentation: https://dozermapper.github.io/gitbook/

Redis client

1.Redission

The Java client Redisson recommended by Redis is a Java resident memory data Grid (In-Memory Data Grid) implemented on the basis of Redis. It makes full use of a series of advantages provided by Redis key-value database and provides users with a series of common tool classes with distributed characteristics based on the interfaces commonly used in the Java utility kit, which makes it easier and more convenient to use Redis, so that users can focus more on business logic processing.

Github: https://github.com/redisson/redisson/

2.Jedis

Java client recommended by Redis.

Github: https://github.com/xetorthio/jedis

Database connection pool

Database connection pool provides a set of efficient connection allocation and use strategies, and finally realizes the efficient management of connections.

1.HikariCP

Fast, simple and reliable. HikariCP is a "zero overhead" production-ready JDBC connection pool.

Github: https://github.com/brettwooldridge/HikariCP

2.Druid

Druid is one of the best database connection pooling in Java language, and Druid can provide powerful monitoring and expansion functions.

Github: https://github.com/alibaba/druid/

3.Tomcat JDBC

JDBC connection pooling is an alternative to Apache Commons DBCP connection pooling.

Official website: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html

Network programming

1.Netty

Netty is a widely used Java network programming framework.

Github: https://github.com/netty/netty

Official website: https://netty.io/

File upload

1.Apache Commons FileUpload

Apache Commons FileUpload makes high-performance file upload easy.

Official website: http://commons.apache.org/proper/commons-fileupload/

Send an email

1.Apache Commons Email

Apache commons Email is designed to provide API for sending e-mail, it is built on top of Java Mail API, and its goal is simplicity.

Official website: http://commons.apache.org/proper/commons-email/

Encoding and decoding

1.Apache Commons Codec

Apache Commons Codec provides implementations of common encoders and decoders, such as Base64,Hex,Phonetic and URL.

Official website: http://commons.apache.org/proper/commons-codec/

IO operation

1.Apache Commons IO

Simple and fast IO operation.

Official website: http://commons.apache.org/proper/commons-io/index.html

Object pool

1.Apache Commons Pool

Provides a common object pool.

Official website: http://commons.apache.org/proper/commons-pool/

Java.lang package utility class

1.Apache Commons Lang

Provide additional functionality for classes in java.lang, such as StringUtils, DateUtils, RandomUtils, FastDateFormat (thread-safe version of SimpleDateFormat).

Official website: http://commons.apache.org/proper/commons-lang/index.html

Set operation

1.Apache Commons Collections

Collection of related operation tool classes.

Official website: http://commons.apache.org/proper/commons-collections/

2.Guava

Guava is a set of core Java libraries of Google, which can manipulate new collection types (such as multiple graphs and sets) and immutable collections in addition to the collection types that we often use.

Github: https://github.com/google/guava

All-round tool class

1.Guava

Guava is a core set of Java libraries for Google, including new collection types (such as multiple graphs and multiple sets), immutable collections, graphics libraries, and utilities for concurrency, I / O, hashing, caching, primitives, strings, and so on! It is widely used in most Java projects of Google, and is also widely used by many other companies.

Github: https://github.com/google/guava

2.Hutool

Hutool is a Java toolkit and just a toolkit that helps us simplify every line of code, reduce every method, and make the Java language "sweet".

Github: https://github.com/looly/hutool

Date and time operation

1.Joda-Time

Joda-Time provides a quality alternative to the Java date and time class.

Official website: https://www.joda.org/joda-time/

Unit testing

1.JUnit

Official website: https://junit.org/junit5/

2.Mockito

Mockito is a Java unit test simulation framework.

Official website: https://site.mockito.org/

3.PowerMock

PowerMock is also a Java unit test simulation framework that simulates static methods, constructors, final classes and methods, private methods, removal of static initializers, and so on.

Official website: http://powermock.github.io/

4.moco

In the daily work of interface testing, we often need to rely on the API of other systems, but co-debugging is not common, so we can only complete the data dependence through mock. Moco is a project that simulates server-side services and can be used to test piling.

Github: https://github.com/dreamhead/moco

Security framework

1.Apache Shiro

Apache Shiro is a powerful and easy-to-use Java security framework for authentication, authorization, encryption, and session management. With API, which is easy to understand by Shiro, you can quickly and easily protect any application, from the smallest mobile application to the largest Web and enterprise applications.

Official website: http://shiro.apache.org/

Journal

1.SLF4J + Logback

SLF4J provides a simple and unified interface for various loging APIs, which enables end users to configure their desired loging APIs implementation at deployment time. It is a logging interface.

Logback is another open source logging component designed by the founder of log4j, which is an implementation of logging.

SLF4J official website: http://www.slf4j.org/

Logback official website: https://logback.qos.ch/

Object pool

1.Apache Commons Pool

Apache Commons Pool provides object pooling API and a series of object pooling implementations.

Official website: https://commons.apache.org/proper/commons-pool/

Basic network communication

1.Apache Commons Net

The Apache Commons Net library implements many basic Internet protocol clients. The purpose of the library is to provide basic protocol access, not a higher level of abstraction.

Official website: http://commons.apache.org/proper/commons-net/index.html

Job scheduling framework (scheduled tasks)

1.Quartz

Quartz is an open source job scheduling framework written entirely by Java and can be used to create simple or complex schedules for executing a job.

Official website: http://www.quartz-scheduler.org/

Github: https://github.com/quartz-scheduler/quartz

2.ElasticJob

ElasticJob is a distributed scheduling solution, which solves the disadvantage that Quartz does not support distributed scheduling. The main functions of Elastic job include support for elastic expansion, centralized management and monitoring of job through Zookepper, support for failure transfer, and so on.

Github: https://github.com/apache/shardingsphere-elasticjob

Configuration center

1.Nacos

Nacos is a dynamic service discovery, configuration management and service management platform that is easier to build cloud native applications. Nacos's dynamic configuration service allows you to manage the configuration of all environments in a centralized, externalized, and dynamic manner. Dynamic configuration eliminates the need to redeploy applications and services when configuration changes. Configuration-centric management makes it easier to implement stateless services and makes it easier to scale services flexibly on demand.

Official website: https://nacos.io/

Github: https://github.com/alibaba/nacos

2.Spring Cloud Config

Spring Cloud Config provides server-side and client-side support for externalized configurations in distributed systems. With Config Server, you can manage the external properties of applications in all environments in a central location.

Documentation: https://cloud.spring.io/spring-cloud-config/reference/html/

3.Apollo

Apollo (Apollo) is a distributed configuration center developed by Ctrip Framework Department, which can centrally manage the configuration of applications in different environments and clusters. After configuration modification, it can be pushed to the application in real time, and has standardized permissions, process governance and other features, so it is suitable for micro-service configuration management scenarios.

Github: https://github.com/ctripcorp/apollo

Current limit

1.Guava RateLimiter

RateLimiter is based on the token bucket algorithm, that is, tokens are placed into the token bucket at a constant rate set by the user. When the user performs the task, it can only be executed when the user gets the token.

2.Sentinel

Sentinel is a highly available protection component for distributed service architecture, which mainly takes traffic as the starting point to help users ensure the stability of micro-services from many dimensions, such as flow control, circuit breaker degradation, system adaptive protection and so on.

Official website: https://sentinelguard.io/

Github: https://github.com/alibaba/Sentinel

Fuse degradation

When a resource in the calling link is unstable, such as timeout, and the exception rate increases, the call of this resource is limited, and the request fails quickly to avoid affecting other resources, resulting in an avalanche effect.

1.Sentinel

Sentinel limits the invocation of resources by limiting the number of concurrent threads and demoting resources through response time to make the request fail quickly and avoid affecting other resources.

Official website: https://sentinelguard.io/

Github: https://github.com/alibaba/Sentinel

2.Hystrix

Hystrix isolates resources through thread pooling. The advantage of this is that resources and resources are most completely isolated. The disadvantage is that in addition to increasing the cost of thread switching, each resource needs to be allocated the thread pool size in advance. Hystrix is no longer under active development and is currently in maintenance mode, so it is officially recommended to use Resilience4j instead.

Github: https://github.com/Netflix/Hystrix

3.Resilience4j

Resilience4j is a lightweight fault-tolerant library inspired by Netflix Hystrix, but designed specifically for Java 8 and functional programming. Lightweight because the library only uses Vavr, while Vavr does not have any other external library dependencies.

Github: https://github.com/resilience4j/resilience4j

Sub-database sub-table

1.Apache ShardingSphere

Apache ShardingSphere is positioned as relational database middleware, which aims to make full use of the computing and storage capacity of relational database in distributed scenarios, but not to achieve a new relational database. Support data slicing, read-write separation, multiple data copies, data encryption, shadow library stress testing and other functions.

Official website: https://shardingsphere.apache.org/

Github: https://github.com/apache/shardingsphere

2.Mycat

Mycat is the database sub-database sub-table middleware.

Official website: http://www.mycat.org.cn/

Github: https://github.com/MyCATApache

Serialization

1.Kryo

Kryo is a fast and efficient binary object graph serialization framework for Java. The goal of the project is high speed, small size and easy to use API. This project is useful whenever you need to persist an object to a file and the database is over the network.

Github: https://github.com/EsotericSoftware/kryo

2.Hessian

Hessian is a framework technology that supports serialization operations in multiple languages. At the same time, the code stream generated after serialization is also small, and the performance of processing data is much better than the built-in jdk serialization mode of java.

Official website: http://hessian.caucho.com/

3.Protobuf

Protobuf is a flexible and efficient open source protocol for serializing data from Google. Compared to XML and JSON formats, protobuf is smaller, faster, and more convenient.

Github: https://github.com/protocolbuffers/protobuf

Official website: https://developers.google.com/protocol-buffers/

RPC framework

1.Dubbo Apache Dubbo is a high-performance, lightweight open source Java RPC framework that provides three core capabilities: interface-oriented remote method invocation, intelligent fault tolerance and load balancing, and automatic service registration and discovery.

Official website: http://dubbo.apache.org/zh-cn/

Github: https://github.com/apache/dubbo

2.Thrift Thrift is a software framework (remote procedure call framework) for the development of extensible and cross-language services. It combines a powerful software stack and code generation engine to build seamless and efficient services that integrate seamlessly between Cellular languages, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, Cocoa, JavaScript, Node.js, Smalltalk, and OCaml. Thrift was originally developed by facebook, opened source in April 2007, entered the apache Incubator in May 2008, and is now a top-level project of the Apache Foundation. Thrift allows you to define data types and service interfaces in a simple definition file as an input file, and the compiler generates code to easily generate a seamless cross-programming language for RPC client and server communication.

Official website: http://thrift.apache.org/

3.gRPC gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. GRPC enables client and server applications to communicate transparently and simplifies the construction of connection systems. C, Java and Go language versions are currently available, which are grpc, grpc-java, grpc-go. C version supports C, Cellular, Node.js, Python, Ruby, Objective-C, PHP and C # support.

Official website: https://www.grpc.io/

Github: https://github.com/grpc/grpc

At this point, the study on "what are the common class libraries for Java developers" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report