package com.webchat.gateway.controller; import com.webchat.common.bean.APIResponseBean; import com.webchat.common.bean.APIResponseBeanUtil; import com.webchat.domain.vo.response.UserBaseResponseInfoVO; import com.webchat.rmi.user.UserServiceClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Author 程序员七七 * @webSite https://www.coderutil.com * @Date 2025/1/14 00:55 * @description */ @RefreshScope @RestController @RequestMapping("/pgc-service") public class TestController { @Autowired private UserServiceClient userServiceClient; @GetMapping("/user/{userId}") public APIResponseBean user(@PathVariable String userId) { return APIResponseBeanUtil.success(userServiceClient.userInfo(userId)); } }