quarkusmail-sender

Quarkus: How to define and read properties file (or application.properties) outside application or at runtime?


In Quarkus, We have properties file inside project itself called application.properties.

Is there any Quarkus way to define external properties file in my use case like i am developing a mail sender and i want to add recipients in future.

Is it possible to give application.properties outside at local and inject it at runtime?


Solution

  • You can add a configuration file in your application working directory under config/application.properties : https://quarkus.io/guides/config#overriding-properties-at-runtime

    There is ongoing discussion to have more runtime configuration capabilities here: https://github.com/quarkusio/quarkus/issues/1218