BreadcrumbHomeResourcesBlog Popular Java Microservices Frameworks November 19, 2019 Popular Java Microservices FrameworksMicroservicesJava FrameworksBy Sander SõnajalgFor every step in deploying microservices in Java, developers need to consider what's right for their application. One of the biggest decisions? Choosing the right microservices framework. In our article today, we'll give a brief overview of four popular Java microservices frameworks and discuss their relative strengths and shortcomings.Table of ContentsPopular Java Microservices FrameworksFinal ThoughtsTable of Contents1 - Popular Java Microservices Frameworks2 - Final ThoughtsBack to topPopular Java Microservices FrameworksFrom the feature-rich Spring Boot, to more niche frameworks like Dropwizard, Java microservices frameworks run the gamut of purpose and functionality. These four microservices frameworks showcase that idea, and give a good sense of what developers have at their disposal for developing Java microservices applications.1. Spring and Spring BootAccording to a recent Jakarta EE developer report, Spring Boot is the leading framework for building microservices applications in Java. With a reported 57% market share, there are plenty of reasons why developers choose Spring Boot for microservices applications.Spring Boot is a mature, open-source, feature-rich framework with excellent documentation and a huge community – in case you need to ask a question or run into issues.Going with the market leader, you can be pretty sure the framework has the functionality and flexibility to match your more complex use cases. Tools to address common needs are built into the framework itself (e.g. the Spring Boot Security Autoconfiguration, which provides application security out-of-box).Spring Boot follows the “opinionated configuration” philosophy, making it super-easy to get started with a default auto-wired application template. A developer can start an auto-wired application template in minutes by visiting start.spring.io.The framework propagates building your application into a JAR and running it on the embedded Tomcat server, making it a perfect combination with Docker to manage a virtualized deployment environment. As always, you can deviate from the default approach at will and customize your application as needed.Given the popularity of Spring Boot, it will be easier to find developers with previous experience with the framework. Additionally, training, commercial support and professional services are widely available – either via Pivotal itself or from numerous third party vendors.To adapt the old adage; “Nobody ever got fired for choosing Spring Boot.”2. DropwizardDropwizard is the open-source framework known for rapid development of RESTful web services.In addition, Dropwizard boasts high performance and ops-friendliness for microservices application development. Like Spring Boot, Dropwizard applications are packaged into fat JAR files with the Jetty application server embedded.Dropwizard integrates the tried-and-tested Java libraries into a fully functional platform: Jersey for REST, and Jackson for JSON. For templates, FreeMarker and Mustache are available for Java-based UIs. Dropwizard ships with no built-in dependency injection solution, but integrations exist for Guice and Dagger. By using Dropwizard, you sacrifice some in the flexibility, but win it back by having a well-tested combination of tools, prewired for getting your project off the ground rapidly.Dropwizard is an excellent choice for writing RESTful services, so consider it when this is most of what you need to do. Should you need to create a lot of Java-based UI, a full-blown application framework like Spring Boot might be a better choice. Alternatively, you can write the UI fully in JavaScript with frameworks like React.3. Eclipse MicroProfileThe Eclipse MicroProfile aims to create a standard API for microservices in Java. You may think of it as the Java EE for microservices – MicroProfile is the API, while there are a bunch of containers providing their own implementations (like WebSphere and WebLogic are implementing the Java EE). MicroProfile brings a bunch of vendors and community organizations together to join forces and standardize the ecosystem.Key APIs in MicroProfile include CDI, JAX-RS, JSON-P, Config, Metrics and others.Part of the MicroProfile philosophy is frequent releases. The latest major release at the time of writing is MicroProfile 3 from June 2019, which is already supported by latest releases of Thorntail, Helidon, Open Liberty and WebSphere Liberty. Payara and TomEE are a currently a little behind with their support. You can see the full matrix of spec versions and implementations. As of now, it is still unclear which implementations will dominate the ecosystem going forward.4. MicronautMicronaut has a blazing-fast startup time, making it great for microservices -- and even better for implementing serverless functions. The fast startup is achieved by avoiding reflection-based IoC frameworks, which Spring Boot relies on heavily. With the help of GraalVM, Micronaut apps can be combined to native machine code, optimizing the startup further.Being specifically designed for these purposes, Micronaut has excellent built-in support for cloud deployment. It has out-of-box support for service discovery, Kubernetes, distributed tracing and serverless functions.Back to topFinal ThoughtsThe frameworks mentioned here are designed to serve as the foundation for your microservices applications, but there are other tools available for improving developer productivity even further.JRebel gives developers the ability to skip redeploys and instantly load code changes. Contact us for a personalized demo and see how!SEE A LIVE DEMOAdditional ResourcesWant to see which frameworks are most used in Java today? This webinar looks at the most-used frameworks, application servers, build tools, and more. It also gives valuable insight into how many companies are using or planning on using microservices, and the technologies they're using to help.Back to top
Sander Sõnajalg Ex-Product Manager, JRebel and XRebel Sander was the product manager for JRebel and XRebel. He was with JRebel for over 10 years, right from the start of Zeroturnaround, the startup company originally behind JRebel. Sander started out as a Java engineer and transitioning into product role mid-way. Sander's second education is law and professional passions include software technology, marketing and the evolution of high tech markets.