'Is there a way to set dynamically value of a parameter of an .env file in Quarkus?

I have an .env file that contains;

twitch.api.authKey=Bearer *************

As authKey expires about 60days, I need to dynamically set value of the property in .env file. Is it possible to do that in Quarkus?

Thanks in advance



Solution 1:[1]

This is not supported by Quarkus. The .env file is loaded and cached on application startup.

It is possible to implement your own custom ConfigSource that reloads configuration (or just reads the config everytime it is required). Check here: https://quarkus.io/guides/config-extending-support#custom-config-source

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Roberto Cortez