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 ...