Quick Start with Quarkus

Production-ready compilation flags and build commands

Native Java Microservices: QUICK START (5s)

Copy → Paste → Live

curl -s https://code.quarkus.io/d?e=resteasy-reactive,hibernate-orm-panache | bash
cd code-with-quarkus
./mvnw quarkus:dev
$
Quarkus X.X.X started in X.XXXs. Listening on: http://localhost:8080. Learn more in native executable compilation section
⚡ 5s Setup

When to Use Quarkus

Decision matrix per scegliere la tecnologia giusta

IDEAL USE CASES

  • Microservices requiring sub-second startup times with Quarkus native compilation

  • Serverless functions and Kubernetes pods needing minimal memory footprint with Quarkus containers

  • Cloud-native applications demanding fast deployment cycles using Quarkus dev mode

AVOID FOR

  • Heavy JPA operations requiring extensive reflection without Quarkus metadata processing

  • Dynamic proxying patterns incompatible with GraalVM native image compilation

  • Legacy Spring Boot applications with runtime bytecode generation unsupported by Quarkus native

Core Concepts of Quarkus

Production-ready compilation flags and build commands

#1

Native Executable Compilation: GraalVM AOT Build

Quarkus native compilation converts Java bytecode to machine code using GraalVM's ahead-of-time compiler, eliminating JIT startup delays and reducing memory consumption by 70-80% versus traditional JVM runtime.

✓ Solution
Use @RegisterForReflection annotation or configure graal/reflection-config.json with all dynamically loaded classes
+95% faster startup time, -75% memory footprint
#2

Reactive Streams Integration: Reactive Frameworks

Quarkus provides first-class support for reactive programming with Mutiny, RxJava, and Project Reactor, enabling non-blocking I/O and backpressure handling across database calls, HTTP clients, and message brokers.

✓ Solution
Use @Transactional(NOT_SUPPORTED) for reactive methods or employ Uni/Multi Mutiny types consistently
+300% throughput improvement in I/O-bound operations
#3

Container Optimization: Minimal Docker Images

Quarkus native images produce 100MB container images compared to 400MB+ traditional Java JARs, enabling faster pulls, reduced storage, and improved cold-start performance in Kubernetes deployments.

Native: 60MB + 40MB base = 100MB total vs Traditional JVM: 400MB + 250MB base = 650MB total
#4

Live Code Reload: Dev Mode Hot Restart

Quarkus dev mode automatically recompiles and restarts application on file changes, maintaining session state and providing instant feedback loop for development iteration.

✓ Solution
Configure @SessionScoped beans or externalize session state to Redis
#5

Dependency Injection with Contexts & Dependency: CDI Integration

Quarkus extends CDI 3.0 with @Inject, @Singleton, and custom scopes, enabling lightweight bean management with compile-time verification and circular dependency detection.