package com.gkhy.safePlatform.account.controller; import com.gkhy.safePlatform.account.mq.producer.DemoMqProducer; 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; //@RestController //@RequestMapping(value = "/t/mq") public class MqDemoController { // @Autowired private DemoMqProducer demoMqProducer; @GetMapping("/send") public Object testMqSend(String msg){ System.out.println("SSS"); if(demoMqProducer.sendTestDelayStrMsg(msg) == true){ return "Success"; }else { return "Fail!"; } } }