首次提交代码
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.gzzn.omms.msgexchangeapi.controller;
|
||||
|
||||
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;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.msgexchangeapi.service.IKafkaService;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/kafka")
|
||||
public class KafkaController {
|
||||
@Autowired
|
||||
private IKafkaService kafkaservice;
|
||||
|
||||
@GetMapping(value = "/send")
|
||||
public ResponseDto sendKafka(String msg,String topic) {
|
||||
kafkaservice.msgSend(topic, msg);
|
||||
return ResponseDto.success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user