package cn.gintone.controller;

import cn.gintone.iotdbUtils.IotDBUtil;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin-api/sec/device-req-test")
public class TestController {

    @Autowired
    private RabbitTemplate rabbitTemplate;


    @GetMapping("/testRabbit")
    public void testRabbit() {

//        String message = "hellow spring boot topic message";
//        rabbitTemplate.convertAndSend("my_boot_fanout_exchange", "product.delete", message);

    }

    @GetMapping("/testIotdb")
    public void testIotdb() {
        IotDBUtil.select();
    }
}
