In the Quarkus Application Configuration Guide it mentions how to configure an app with profiles (eg. %dev.quarkus.http.port=8181
).
But is there a way to access a Profile (or Environment) API so I can log the active profiles ? For example something like Spring:
@ApplicationScoped
public class ApplicationLifeCycle {
private static final Logger LOGGER = LoggerFactory.getLogger("ApplicationLifeCycle");
@Inject Environment env;
void onStart(@Observes StartupEvent ev) {
LOGGER.info("The application is starting with profiles " + env.getActiveProfiles());
}
ProfileManager.getActiveProfile()?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With