-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Hands-On Microservices with Kotlin
By :

When we create a Spring Boot application, we may need to use configuration values, things that we want to externalize from the application code itself, or that we may want to change without affecting the main code.
First, we will make some changes in our service and review the different methods to configure the application. Then, we will understand what Spring Expression Language is, and how we can use application profiles. Finally, we will apply our knowledge of configuration to create some conditional beans.
There is a time in any application that we may need to have a configurable value, something that we can define outside our main code and that can easily change, let's get an understanding through an example, modifying our service class:
package com.microservices.chapter2 import org.springframework.beans.factory.annotation.Value import org.springframework.stereotype.Service @Service class ExampleService : ServiceInterface { @Value...