package com.zksy.data.controller;

import com.zksy.data.utils.PublisherMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/test3")
public class Test3Controller {
    @Autowired
    private PublisherMessage publisherMessage;
    @GetMapping("/a")
    public String hello(String msg){
        publisherMessage.emitDelayMessage(msg,5000);
        return "hello world";
    }
    @GetMapping("/b")
    public List<String> b(){
        return List.of("1");
    }
}
