Updating the application

Now, we will make a small change in our application. Open again our project using IntelliJ IDEA, and then open our CustomerController class:

package com.microservices.chapter11import org.springframework.web.bind.annotation.GetMappingimport org.springframework.web.bind.annotation.PathVariableimport org.springframework.web.bind.annotation.RestControllerimport java.util.concurrent.ConcurrentHashMap@RestControllerclass CustomerController {  companion object {    val initialCustomers = arrayOf(Customer(1, "Kotlin"),        Customer(2, "Spring"),        Customer(3, "Microservice"),        Customer(4, "OpenShift"))    val customers = ConcurrentHashMap<Int, Customer>    (initialCustomers.associateBy(Customer::id))  }  @GetMapping("/customers")  fun getCustomers ...

Get Hands-On Microservices with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.