引入多数据源及内存数据库
This commit is contained in:
@@ -1,23 +1,34 @@
|
||||
package com.gzzn.omms.msgexchangeapi.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entity.Cminmsg;
|
||||
import com.gzzn.omms.msgexchangeapi.dto.ResponseDto;
|
||||
import com.gzzn.omms.msgexchangeapi.service.ICminmsgService;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cminmsgs")
|
||||
public class CminmsgsController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ICminmsgService cminmsgService;
|
||||
|
||||
|
||||
/***
|
||||
* 发送消息到Cminmsgs数据库表
|
||||
* @param msg
|
||||
* @param topic
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/send")
|
||||
public ResponseDto send(String msg,String topic) {
|
||||
return ResponseDto.success();
|
||||
@PostMapping(value = "/send")
|
||||
public ResponseDto send(@RequestBody String xmlmsg) {
|
||||
|
||||
Cminmsg minmsg = cminmsgService.sendXmlMsg(xmlmsg);
|
||||
|
||||
return ResponseDto.success(minmsg.getCminmsgsId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user