Skip to content

Add option to detect or prevent duplicate route registrations #3741

@kangmind

Description

@kangmind

Description

Currently, Jooby allows multiple routes to be registered with the same HTTP method and path without any warning or error. The latest registered route silently overrides the previous ones. This can lead to hard-to-debug issues, especially in large applications or when using modular route definitions.

Request

Please consider adding a feature to:

  • Detect and warn about duplicate route registrations at startup, or
  • Provide a config flag such as jooby.failOnDuplicateRoutes = true to make the app fail if duplicate routes are detected.

Motivation

This behavior can easily lead to silent bugs. For example, when two modules register the same route path by mistake, the earlier one gets silently overridden. This can result in unexpected runtime behavior that is hard to track.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions