spring-cloud / spring-cloud/spring-cloud-gateway

How do you prevent two people from configuring the same predicates path, but different downstream services lead to one person routing not working?

Open
#615 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

How do you prevent two people from configuring the same predicates path, but different downstream services lead to one person routing not working?
Such as:
route1:

spring:
  cloud:
    gateway:
      routes:
      - id: route1
        uri: http://123.book.com
        predicates:
        - Path=/book/**
        filters:
        - RewritePath=/book/(?<segment>.*), /$\{segment}

route2:

spring:
  cloud:
    gateway:
      routes:
      - id: route2
        uri: http://456.book.com
        predicates:
        - Path=/book/**
        filters:
        - RewritePath=/book/(?<segment>.*), /$\{segment}

The above configuration comes from two people who don't know each other.It can result in a certain person's configuration invalid.
How do you prevent this, such as giving friendly reminders or reporting errors directly when the same path configuration is saving? Is the spring cloud gateway supported?

Contributor guide

Open the contributing guide

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.

Research direction

No source file or test is named. Start by reviewing Spring Cloud Gateway's route predicate matching and route configuration behavior against the two Path=/book/** examples; a complete issue would need a decided validation or conflict-handling requirement and a reproducer.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.