Search code examples
quarkus

What is the equivalent of the application-local.properties file in Quarkus


It seems to me that in Spring Boot the local profile is a de facto standard for local development.

Is there a way in Quarkus that one has a application-dev.properties, which is equivalent to the application.properties....

My goal is to store secrect information necessary for local development, which should not be committed to git... I have not found anything from searching and only found a ".env" file in the .gitignore.

What would be the correct Quarkus solution?


Solution

  • Quarkus supports profile aware files to configure the application. The default profiles are:

    • dev - Activated when in development mode (i.e. quarkus:dev)
    • test - Activated when running tests
    • prod - The default profile when not running in development or test mode

    So configuration values in application-dev.properties file will be activated in development mode.

    Some newsworthy information from the reference:

    In this style, the configuration names in the profile aware file do not need to be prefixed with the profile name.

    Properties in the profile aware file have priority over profile aware properties defined in the main file.