RemoteUserService.java 914 B

123456789101112131415161718192021222324252627
  1. package com.ruoyi.system.api;
  2. import org.springframework.cloud.openfeign.FeignClient;
  3. import org.springframework.web.bind.annotation.GetMapping;
  4. import org.springframework.web.bind.annotation.PathVariable;
  5. import com.ruoyi.common.core.constant.ServiceNameConstants;
  6. import com.ruoyi.common.core.domain.R;
  7. import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
  8. import com.ruoyi.system.api.model.UserInfo;
  9. /**
  10. * 用户服务
  11. *
  12. * @author ruoyi
  13. */
  14. @FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
  15. public interface RemoteUserService
  16. {
  17. /**
  18. * 通过用户名查询用户信息
  19. *
  20. * @param username 用户名
  21. * @return 结果
  22. */
  23. @GetMapping(value = "/user/info/{username}")
  24. public R<UserInfo> getUserInfo(@PathVariable("username") String username);
  25. }