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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.