Describe the issue My current project is using- Spring Cloud version: Greenwich.RELEASE Spring Boot version: 2.2.1.RELEASE Using another project as dependency where they have defined FeignClient as:
@FeignClient(name = "MessagingClient", url = "${messaging.hypertext}", configuration = MessagingFeignClientConfig.class)
public interface MessagingAppRestClient {
@PostMapping(value = "api.io/destinations")
In my application.properties - messaging.hypertext=https://
Feign client working expected with generating url as https://api.io/destinations
When trying to upgrade using,
Spring Cloud version: 2021.0.1
Spring Boot version: 2.6.4
Feign client is populating url as https://null//api.io/destinations
Couldn't understand how 'null//' is getting appended in the absolute/final url. I have no control over the other project where feign client is defined. So let me know if there is any workaround I can do it in my project to fix this issue/make feign backward compatible with Greenwich.RELEASE.
Comment From: OlgaMaciaszek
Hello @gokulvenugopal9; This is not a supported use-case. If that was working in Greenwich, it must have been more of a side-effect. The url is supposed to contain the host. What's being appended should only be the path. So, you should refactor the property like so messaging.hypertext=https://api.io and the annotation to @PostMapping(value = "/destinations")
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.