Created
September 6, 2018 05:46
-
-
Save ankitthakur/8fc2173aa25fda6bd97d460994c2baf4 to your computer and use it in GitHub Desktop.
Kafka Consumer based Rest Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.thakur.kafkaclient.controller | |
import com.thakur.kafkaclient.service.KafkaService | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.web.bind.annotation.GetMapping | |
import org.springframework.web.bind.annotation.RequestMapping | |
import org.springframework.web.bind.annotation.RestController | |
@RestController | |
@RequestMapping("kafka") | |
class KafkaClientController { | |
private val service:KafkaService | |
constructor(service: KafkaService) { | |
this.service = service | |
} | |
@GetMapping("client") | |
fun helloClient(): String { | |
return service.clientService() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment