Configuring a Quarkus Application
Explore how to configure a Quarkus application using various methods such as system properties, environment variables, .env files, and configuration files in .properties or .yaml formats. Understand how to inject and use custom properties within your code to customize application behavior.
Introduction
Quarkus offers multiple ways to configure our application. The most common include:
- System properties
- Environment variables
- An
.envfile in the working directory - A Quarkus application file (
.propertiesor.yamlfile)
System properties
System properties are passed to a Quarkus application with the -D flag when running our application.
When working with the developer tools, we can pass all kinds of properties. For example, when we created our application, we used the below command to generate the source code:
The example above uses Maven to create a new Quarkus application while passing the ...