I want to use Spring RestTemplate in Kotlin like this:
RestTemplate
//import org.springframework.web.client.RestTemplate fun findAllUsers(): List {
You may try
return restTemplate.getForObject(URI(hostAddress), Array::class.java).toList()