package com.ruoyi.demo.controller.test;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.rest.RestUtil;
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("/rest" )
public class RestTestController {

    @Autowired
    private RestUtil restUtil;

    @GetMapping("/test" )
    public R test() {
        String result = restUtil.getForEntity("http://localhost:8081/rabbitmq/test" , String.class, null);
        return R.ok(result);
    }
}
