@FeignClient("authorization-service")
public interface AuthorizationFeignClient {
@PostMapping("/oauth/token")
ResponseEntity<JwtToken> getToken(
@RequestParam("grant_type") String grantType,
@RequestParam("username") String username,
@RequestParam("password") String password,
@RequestParam("login_type") String loginType,
@RequestParam("Authorization") String basicToken
);
}
使用Feign远程调用另外一个服务时出现401错误,没有将token进行服务之间的传递,出现了以下错误。
下面这个拦截器需要注入吗?
它的内部实现了在远程调用请求之前进行拦截,然后进行加入token进行传递