12345678910111213141516171819202122232425262728293031323334 |
- 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<UserBaseResponseInfoVO> user(@PathVariable String userId) {
- return APIResponseBeanUtil.success(userServiceClient.userInfo(userId));
- }
- }
|