Quarkus - Guides

You have gone through the Getting Started guides. You are now ready to dive into specific topic guides.

Configuring Your Application

Hardcoded values in your code is a no go (even if we all did it at some point ;-)). In this guide, we learn how to configure your application.

READ THE GUIDE

Application Initialization and Termination

You often need to execute custom actions when the application starts and clean up everything when the application stops. This guide explains how to be notified when an application stops or starts.

READ THE GUIDE

Contexts and Dependency Injection

Quarkus DI solution is based on the Contexts and Dependency Injection for Java 2.0 specification. However, it is not a full CDI implementation verified by the TCK. Only a subset of the CDI features is implemented - see also the list of supported features and the list of limitations.

READ THE GUIDE

Testing Your Application

This guide covers:

  • Testing in JVM mode
  • Testing in native mode
  • Injection of resources into tests

READ THE GUIDE

Configuring Logging

This guide explains logging and how to configure it.

READ THE GUIDE

Using SSL With Native Images

In this guide, we will discuss how you can get your native images to support SSL, as native images don’t support it out of the box.

READ THE GUIDE


Data

Using Hibernate ORM and JPA

Hibernate ORM is the de facto JPA implementation and offers you the full breath of an Object Relational Mapper. It works beautifully in Quarkus.

READ THE GUIDE

Hibernate ORM and JPA with Panache

Hibernate ORM is the de facto JPA implementation and offers you the full breadth of an Object Relational Mapper. It makes complex mappings possible, but it does not make simple and common mappings trivial. Panache focuses on making your entities trivial and fun to write.

READ THE GUIDE

Using Infinispan Client

Infinispan is an in memory data grid that allows running in a server outside of application processes. This extension provides functionality to allow the client that can connect to said server when running in Quarkus.

READ THE GUIDE

Using Transactions

Quarkus comes with a Transaction Manager and uses it to coordinate and expose transactions to your applications. Each extension dealing with persistence will integrate with it for you. And you will explicitly interact with transactions via CDI. This guide will walk you through all that.

READ THE GUIDE

Validation with Hibernate Validator

This guide covers how to use Hibernate Validator/Bean Validation in your REST services.

READ THE GUIDE


Web

Writing JSON REST Services

JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads.

READ THE GUIDE

Validation with Hibernate Validator

This guide covers how to use Hibernate Validator/Bean Validation in your REST services.

READ THE GUIDE

Using the REST Client

This guide explains how to use the MicroProfile REST Client in order to interact with REST APIs with very little effort.

READ THE GUIDE

Using JWT RBAC

This guide explains how your application can utilize {mp-jwt} to provide secured access to the JAX-RS endpoints.

READ THE GUIDE

Using WebSockets

This guide explains how your Quarkus application can utilize web sockets to create interactive web applications. Because it’s the canonical web socket application, we are going to create a simple chat application.

READ THE GUIDE


Security

Using Security

This quide demonstrates integration with the Elytron security subsystem to allow for RBAC based on the common security annotations @RolesAllowed, @DenyAll, @PermitAll on REST endpoints.

READ THE GUIDE

Using JWT RBAC

This guide explains how your application can utilize {mp-jwt} to provide secured access to the JAX-RS endpoints.

READ THE GUIDE


Cloud

Deploying Knative Application to Kubernetes or OpenShift

This guide covers:

  • The deployment of the application to Kubernetes

READ THE GUIDE

Deploying Applications on Kubernetes

This guide covers:

  • The deployment of the application to Kubernetes
  • The deployment of the application to OpenShift

READ THE GUIDE


Observability

Using OpenTracing

This guide explains how your Quarkus application can utilize OpenTracing to provide distributed tracing for interactive web applications.

READ THE GUIDE


Serialization

Writing JSON REST Services

JSON is now the lingua franca between microservices. In this guide, we see how you can get your REST services to consume and produce JSON payloads.

READ THE GUIDE


Tooling

Building Applications with Maven

This guide covers:

  • Maven configuration
  • Creating a new project
  • Dealing with extensions
  • Development mode
  • Debugging
  • Import in your IDE
  • Building a native image
  • Build a container friendly executable

READ THE GUIDE

Building Applications with Gradle

This guide covers:

  • Maven configuration
  • Creating a new project
  • Dealing with extensions
  • Development mode
  • Debugging
  • Import in your IDE
  • Building a native image
  • Build a container friendly executable

READ THE GUIDE


Migration

Using our Spring Dependency Injection compatibility layer

While you are encouraged to use CDI annotations for injection, Quarkus provides a compatibility layer for Spring dependency injection in the form of the spring-di extension.

READ THE GUIDE


Writing Extensions

Write Your Own Extension

Quarkus extensions add a new developer focused behavior to the core offering, and consist of two distinct parts, buildtime augmentation and runtime container. The augmentation part is responsible for all metadata processing, such as reading annotations, XML descriptors etc. The output of this augmentation phase is recorded bytecode which is responsible for directly instantiating the relevant runtime services.

This means that metadata is only processed once at build time, which both saves on startup time, and also on memory usage as the classes etc that are used for processing are not loaded (or even present) in the runtime JVM.

READ THE GUIDE


Alternative Languages

Using Kotlin

This guide explains how to use Kotlin.

READ THE GUIDE


Miscellaneous

Measuring Performance

When measuring the footprint of a Quarkus application, we measure Resident Set Size (RSS) and not the JVM heap size which is only a small part of the overall problem. The JVM not only allocates native memory for heap (-Xms, -Xmx) but also structures required by the jvm to run your application.

READ THE GUIDE

Scheduling Periodic Tasks

Modern applications often need to run specific tasks periodically. In this guide, you learn how to schedule periodic tasks.

READ THE GUIDE