The solution is to use @RequestHeader annotation instead of feign specific annotations
@FeignClient(name="Simple-Gateway")
interface GatewayClient {
@RequestMapping(method = RequestMethod.GET, value = "/gateway/test")
String getSessionId(@RequestHeader("X-Auth-Token") String token);
}
More Related Contents:
- Understanding Spring Cloud Eureka Server self preservation and renew threshold
- How to get custom user info from OAuth2 authorization server /user endpoint
- How to read values from properties file?
- With Spring can I make an optional path variable?
- No mapping found for HTTP request with URI [/WEB-INF/pages/apiForm.jsp] [duplicate]
- @Transactional on @PostConstruct method
- Is there a way to @Autowire a bean that requires constructor arguments?
- How do I mock an autowired @Value field in Spring with Mockito?
- Spring Scheduled Task running in clustered environment
- JSON Web Token (JWT) with Spring based SockJS / STOMP Web Socket
- Spring Data optional parameter in query method
- Filter specific packages in @ComponentScan
- How to test a spring controller method by using MockMvc?
- Spring Data: “delete by” is supported?
- Spring Boot: Is it possible to use external application.properties files in arbitrary directories with a fat jar?
- Spring injects dependencies in constructor without @Autowired annotation
- Why order of Maven dependencies matter?
- How to set up Spring Security SecurityContextHolder strategy?
- The matching wildcard is strict, but no declaration can be found for element ‘tx:annotation-driven’
- How do I remove the ROLE_ prefix from Spring Security with JavaConfig?
- @Autowired in static classes
- Spring Batch: One reader, multiple processors and writers
- Process Spring Boot externalized property values
- How does Spring annotation @Autowired work?
- Spring Expression Language (SpEL) with @Value: dollar vs. hash ($ vs. #)
- How to validate Spring MVC @PathVariable values?
- What is the difference between Spring’s GA, RC and M2 releases?
- Encoded slash (%2F) with Spring RequestMapping path param gives HTTP 400
- JSF View scope in Spring
- Inject Service in ConstraintValidator [Bean Validator – JSR 303] Spring