package com.persagy.server.controllers

import com.persagy.server.jms.TopicSender
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
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


/**
 * 测试消息
 *
 * @author wx  <zhangweixin@sagacloud.com>
 * @date  2020/10/27 19:35
 */
@Api(tags = ["0000、测试消息"])
@RestController
@RequestMapping("/tests")
class TestController {

    @Autowired
    lateinit var topicSender: TopicSender

    /**
     * 创建设备
     *
     * @param   request         设备对象
     * @return                  创建结果信息
     */
    @ApiOperation(value = "测试消息", notes = "")
    @PostMapping(value = ["/test"])
    fun create() {
        topicSender!!.sendMessage()
    } // Function create()

}