Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Trailing slash was added while posting to service context path

Open
#1,340 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, spring
Domain
api, backend

Research direction

Reproduce the request using the Service A Feign client and Service B controller shown in the issue, then trace how @FeignClient(path = "member") and @PostMapping combine into the request URL. Done when the generated POST target omits the trailing slash and a regression test covers this context-path case.

Written by the indexing model from the issue text.

Description

waiting-for-triage

There are two services, service A and service B.

in Service B, its context path is member and there is a controller defined as follow

@Contoller
public MemberController {
    @PostMapping
    public Member saveMember(Member member){
    }
}

and in Service A, a Feign client is defined to call this endpoint

@FeignClient(name = "service-b", path = "member")
public MemberFeignClient {
    @PostMapping
    public Member saveMember(Member member);
}

While executing the code, feign client print log with location calling to http://service-b/member/, which a trailing slash was added. I tried to add config from code or autoconfig to remove it but it was still added.

As Spring is no longer support trailing slash, it threw error as the path not found.

Version:
Spring Cloud OpenFeign: 5.0.1

Dominant language
Java
Stars
1.3k
Forks
836
Avg merge
1d 1h
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-cloud/spring-cloud-openfeign

All issues in spring-cloud/spring-cloud-openfeign

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.