cost 263 ms
应用程序的一个依赖项中的@FeignClient 接口和应用程序主 class 上的@EnableFeignClients 无法将接口作为 bean 加载 - @FeignClient interface in application's one dependency and @EnableFeignClients on application main class can't load the interface as bean

例如: Application A -> dependency B. B 有一个@FeignClient注解的 SPI 接口,它是@Autowired依赖于A 和 B 中的类,当应用程序 A 启动时,SPI 有望正常工作。 在A的main class上添加@EnableFeignClient ...

2023-01-31 02:24:52   1   14    java / feign  
Feign 接口是否应该具有带有指定名称的@PathVariable 和@RequestParam 注释才能工作? - Should Feign interface has @PathVariable and @RequestParam annotations with stated names to work?

在新的 openfeign 库(版本 3.1.3)中有一个检查PathVariableParameterProcessor ,验证带有@PathVariable注释的 arguments 应该填充名称属性。 RequestParamParameterProcessor 中存在类似的检查。 在op ...

如何使用假客户端传递请求参数? - How to pass request param using feign client?

我目前正在使用 Feign Client 调用端点以获取 outlook 封邮件。 但是请求参数在 api 中没有正确传递。 通过服务,我正在调用这个 Email 客户端来获取邮件并传递过滤器,如下所示,从哪里到哪里是日期时间 但实际调用的 api 不准确假设 BASE.URI 类似于 (10.0 ...

如何在调用 ErrorDecoder 之前拦截 http 假装响应和 spring 引导 - How to intercept http response in feign and spring boot before ErrorDecoder invoked

我需要拦截 HTTP 响应并更改 HTTP 状态代码。 例如,我可能会将 200 更改为 400(基于响应 object 本身)以便调用 ErrorDecoder。 我需要在不扩展feign.Client class 的情况下执行此操作(实际上,我正在使用的feign.httpclient.Apac ...

Feign 客户端未正确编码请求参数 - Feign client doesn’t encode request param correctly

我有一个具有以下结构的假客户 其中第二个参数中 map 中的值可以是任何原始类型(int、long)或 object(String、BigDecimal)。 不幸的是,客户端请求中的值似乎没有在服务器端正确反序列化。 例如,发送Map.of(“userId”, 1234567893L)被解析为“us ...

如何直接导入 pem 文件以与 FeignClient 一起使用? - How to import a pem file directly to use with a FeignClient?

我有一个包含私钥和证书的客户端 certificate.pem 文件。 我想使用 Feign 调用需要客户端证书的宁静 api。 我搜索了很多示例,但这些示例教导从 jks 导入密钥,如下所示: 但是,我想直接从 .pem 文件导入证书,因为我没有 .jks 文件并且不想手动转换它,因为 .pem ...

NullPointerException:无法调用 ServletRequestAttributes.getRequest,因为 RequestContextHolder.getRequestAttributes 的返回值为 null - NullPointerException: Cannot invoke ServletRequestAttributes.getRequest because the return value of RequestContextHolder.getRequestAttributes is null

我有一个使用RestTemplate的服务,为此它需要从令牌中获取信息。 我通过 getHeaders() 方法获取 Headers 信息,该方法使用FeignClientInterceptor ,负责从 header 获取授权。 我正在尝试使用jUnit测试此方法,但我不能,即使使用互联网上的信 ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM