Micronaut – Loading external yaml or configuration file

In this tutorial, we will explore how to load an external YAML file in a Micronaut application. Table of contents 1. Why Load External Configuration Files? 2. Defining an External YAML File 3. Configuring Micronaut to Load the External YAML File Using Command Line Argument Using Environment Variable 4. Accessing Configuration Values in Micronaut Using …

Read more

Spring Boot @ConditionalOnProperty Example

In Spring Boot, we can use the @ConditionalOnProperty annotation to conditionally register the beans based on the property value in the application.properties or application.yml file. This article will use the @ConditionalOnProperty annotation to simulate a toggle feature to turn features on or off at runtime without any code changes. Technologies used: Spring Boot 3.1.2 Java …

Read more