tuonina 6 tahun lalu
induk
melakukan
8ed6ee701b

+ 26 - 0
zen-web/src/main/kotlin/cn/gygxzc/envir/api/rabbit/controller/RabbitMQController.kt

@@ -0,0 +1,26 @@
+package cn.gygxzc.envir.api.rabbitmq.controller
+
+import cn.gygxzc.tina.cloud.bus.messager.bean.MessageBean
+import cn.gygxzc.tina.cloud.bus.messager.sender.IMessagerSender
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RequestMapping
+import org.springframework.web.bind.annotation.RestController
+
+/**
+ * Created by niantuo on 2018/9/29.
+ * 这个是一个消息总线的测试controller
+ */
+@RestController
+@RequestMapping("/v1/rabbit/send")
+class RabbitMQController {
+
+    @Autowired
+    private lateinit var messageSender: IMessagerSender
+
+    @PostMapping
+    fun send(message: MessageBean) {
+        messageSender.send(message)
+    }
+
+}