lius
2023-06-08 534aec7a687ceca8120ba798ad20d80d7058ffe6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.jeecg.modules.demo.cloud.controller;
 
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.cloud.service.JcloudDemoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
 
/**
 * 服务端提供方——feign接口
 * 【提供给system-start调用测试,看feign是否畅通】
 * @author: jeecg-boot
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class JcloudDemoProviderController {
 
    @Resource
    private JcloudDemoService jcloudDemoService;
 
    @GetMapping("/getMessage")
    public String getMessage(@RequestParam String name) {
        String msg = jcloudDemoService.getMessage(name);
        log.info(" 微服务被调用:{} ",msg);
        return msg;
    }
 
}