Getting Started

This article summarizes content from the Quarkus Getting Started Guide

Differences from vanilla Jakarta REST

With Quarkus, there is no need to create an Application class. It’s supported, but not required. 

In addition, only one instance of a REST resource is created and not one per request. You can configure this using the different *Scoped annotations (ApplicationScoped, RequestScoped, etc).

Dependency injection in Quarkus is based on ArC which is a CDI-based dependency injection solution, tailored for Quarkus’ architecture. If you’re new to CDI then we recommend you to read the Introduction to CDI guide.

CLI: Development Mode

quarkus dev runs Quarkus in development mode. This enables live reload with background compilation, which means that when you modify your Java files and/or your resource files and refresh your browser, these changes will automatically take effect. 

This command will also listen for a debugger on port 5005. If you want to wait for the debugger to attach before running, you can pass 

-Dsuspend on the command line. If you don’t want the debugger at all you can use -Ddebug=false.

Multi-module Project or external modules

Quarkus heavily utilizes Jandex at build time, to discover various classes or annotations. One immediately recognizable application of this, is CDI bean discovery. 

As a result, most of the Quarkus extensions will not work properly if this build time discovery isn’t properly setup.

This index is created by default on the project on which Quarkus is configured for, thanks to Quarkus’ Maven and Gradle plugins.

However, when working with a multi-module project, be sure to read the Working with multi-module projects section of the Maven or Gradle guides.

If you plan to use external modules, you will need to make these modules known to the indexing process either by adding the Jandex plugin (if you can modify them) or via the quarkus.index-dependency property inside your application.properties (where you can’t modify the module).

Be sure to also read the Bean Discovery section of the CDI guide.