Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure a Quarkus application by putting ordinary settings in src/main/resources/application.properties, then choosing the right source, profile, and configuration API for each value. Quarkus combines configuration sources by priority, so a system property or environment variable can override the value in that file. For settings grouped around a feature, a typed @ConfigMapping keeps names, defaults, and conversions together.

Where Quarkus reads configuration

Quarkus uses SmallRye Config and the MicroProfile Config model. The usual starting point is src/main/resources/application.properties. The Quarkus guide describes using MicroProfile Config annotations to inject configuration properties into an application (Quarkus configuration reference).

Configuration can also come from several sources. When the same key appears in multiple sources, the source with the higher ordinal wins:

Source Ordinal
System properties 400
Environment variables 300
.env 295
$PWD/config/application.properties 260
Classpath application.properties 250
META-INF/microprofile-config.properties 100

This ordering lets a packaged default be overridden for a deployment without editing the application file. To diagnose a surprising value, check higher-priority sources before changing the classpath file. SmallRye Config documents the configuration model and sources.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose how the application consumes each value

Inject one property with @ConfigProperty

For a small number of individual values, inject them with @ConfigProperty. A required property that is absent causes injection to fail during startup. Model optional values or defaults explicitly rather than assuming a missing value will be harmless.

Use @ConfigMapping for related settings

For a cohesive group, define a typed @ConfigMapping interface. Mappings support nested groups, maps, and @WithDefault; the interface centralizes property naming and conversion and makes a configuration group easier to validate. See the Quarkus configuration mappings guide.

Read through the Config API when access is programmatic

When configuration needs to be queried programmatically rather than injected into a bean, use the Config API. Prefer a typed mapping for stable groups of application settings; use direct lookups where dynamic or conditional access is genuinely needed.

Keep application settings separate from Quarkus settings

Quarkus reserves the quarkus. namespace for framework and extension configuration. Put business-specific properties under an application-owned prefix such as app. or myservice.. This makes ownership clearer and avoids collisions with framework keys. The namespace rule is documented in the Quarkus configuration reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set different values for dev, test, staging, and production

Use profiles to express environment differences without losing the common defaults. An inline profile key prefixes a property with the profile name and a period:

%dev.quarkus.http.port=8181

Profile-aware files are another option, such as application-staging.properties. Quarkus activates dev in development mode, test during tests, and prod by default in ordinary production launches. Select a custom profile with quarkus.profile. The profile reference explains the profile mechanisms.

Keep shared defaults in the main file and put only the differences in a profile override. When a deployed value is unexpected, verify which profile is active as well as which configuration source supplied the value.

Know which changes require a rebuild

Quarkus distinguishes build-time configuration from values that can be overridden at runtime. A build-time setting is fixed into the application, so changing it requires rebuilding. A runtime-overridable setting may be supplied at launch, subject to the extension and property involved. In the Quarkus configuration reference, a lock icon identifies build-time properties; check the specific property there before relying on a runtime override. See configuration property metadata.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do not treat every Quarkus property as a deployment-time knob. Classify a setting before deciding where to keep its environment-specific value: if it is build-time, the value must be present when the application is built.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep credentials out of source control

Do not commit plaintext credentials in application.properties. Supply secrets through an approved deployment secret mechanism, or use SmallRye Config’s supported secret handling. SmallRye Config crypto can encrypt values and resolve them through a secret handler; a Java KeyStore can also be used as a ConfigSource. Encryption does not remove the need to protect the key material: restrict access to the keystore file and protect its password. Details are in the SmallRye Config documentation and the Quarkus configuration secrets guide.

Inspect effective configuration in Gradle projects

Gradle projects use the same standard Quarkus configuration model. They can load properties or YAML, profile-aware files, and project properties. Use the quarkusShowEffectiveConfig task to inspect the configuration the build will consume; see the Quarkus Gradle tooling guide.

For production, also verify the active profile and the deployment-provided overrides in the environment where the application runs. The build task shows what the build consumes; it does not by itself establish which runtime source wins after deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical configuration workflow

  1. Put ordinary application defaults in src/main/resources/application.properties.
  2. Use an application-owned prefix for business settings; reserve quarkus. for Quarkus and extension keys.
  3. Check each setting’s metadata to determine whether it is build-time or runtime-overridable.
  4. Express environment-specific differences with %profile. keys or application-{profile}.properties, and confirm the profile activated at launch.
  5. Inject single values with @ConfigProperty, or group related typed settings with @ConfigMapping; define missing-value behavior deliberately.
  6. Provide secrets through a deployment secret mechanism, secret handler, or protected keystore rather than plaintext source control.
  7. When using Gradle, inspect build-consumed values with quarkusShowEffectiveConfig; investigate higher-ordinal sources if a runtime value differs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.