What are the commonly used Java microservice open source frameworks?

With the expansion of program scale and complexity, more and more Java programmers choose to use microservices for project design and development. The emergence of microservices helps developers to develop programs with lower costs and fewer errors, so it has become one of the most important skills for Java developers. But what are the commonly used Java microservice frameworks?

1、Spring Boot

Spring Boot is a specific version of Spring, which makes the construction of microservices easier by processing configuration details. Spring Boot was created to self-start any type of Spring project, not just microservices. After the application is completed, Spring Boot will mix in the web server and output a JAR file, except for the JVM. You can think of it as the original Docker container, which is why many developers responsible for building microservices like Spring Boot very much.

2、Dropwizard

The Dropwizard framework provides developers with a very simple model, which contains many important modules. You can add some business logic or configure other content according to your needs. Finally, you will find that the JAR file is very small and can be started quickly.

Perhaps the biggest limitation of Dropwizard is the lack of dependency injection. If you want to use dependency injection to keep your code clean and loosely coupled, you need to add libraries yourself. This is different from Spring, but now Dropwizard also supports most features, including logging, health checks, and providing flexible code.

3、Cricket

Is a framework for rapid API development. Cricket is small, although it includes many additional features, such as key-value data storage, to avoid connecting to the database and scheduler to control background repetitive processing. No complexity or other dependencies are added, so it is easy to add code to Cricket and start independent microservices.

4、Jersey

One of the standard methods for developing web services is the Java API (also known as JAX-RS) for RESTful web services, which is a common specification implemented in the Jersey framework. This method mainly relies on the use of annotations to specify path mapping and return details. Everything else from parameter parsing to JSON packaging is handled by Jersey.

The main advantage of Jersey is that it implements the JAX-RS standard. This feature is very popular. Some developers are used to combining Jersey with Spring Boot.

5、Play

One of the best ways to experience JVM cross-language capabilities is to use the Play framework, which is compatible with Java or any other JVM language. Its foundation is very modern, with an asynchronous, stateless model, and it will not overload the server with threads trying to track users and their session data. There are many additional features that can be used to enrich the website, such as OpenID, authentication, and file upload support. The Play code base has been developed for more than ten years, so you will also find this ancient feature similar to XML support. Play is mature and light, and this combination is quite distinctive.

Of course, commonly used Java microservice frameworks include Swagger, Helidon, WildFly Thorntail, etc., so I won't repeat them here.

Guess you like

Origin blog.csdn.net/qf2019/article/details/106347765