UserCenterAPI.java 950 字节
package com.tianbo.analysis.feign;

import com.tianbo.analysis.feign.fallback.UserCenterFallbackFactory;
import com.tianbo.analysis.feign.interceptor.TokenInterceptor;
import com.tianbo.analysis.model.ResultJson;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Component
//CLOUD-USER-CENTER
@FeignClient(name = "CLOUD-USER-CENTER",
        fallbackFactory = UserCenterFallbackFactory.class,
        configuration = TokenInterceptor.class
)
public interface UserCenterAPI {

    @ResponseBody
    @GetMapping("/perm/getUserPermByToken")
    ResultJson getDataPerm(@RequestParam("path") String path, @RequestHeader("Authorization") String token);

}