引入多数据源及内存数据库

This commit is contained in:
zhouxiunai
2018-11-28 20:32:19 +08:00
parent 799544ff9c
commit f8d392d5af
23 changed files with 424 additions and 72 deletions
@@ -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());
}
}