Skip to content

Add ability to make some views live only in DEV Mode #25170

Description

@abdullahtellioglu

Describe your motivation

In Copilot, we are aiming to create some example views that should be available only when in development mode. These views should not be exposed to production what so ever.

There is no solution that we can provide right now. Throwing an exception in constructor inside ApplicationConfiguration#isProduction is the best workaround that we have so that users would get 500 internal error in production mode.

Describe the solution you'd like

The best solution that we could think of a new Annotation that filters out route views while generating a production build. Similar to Spring profile, but might be explicit for DevMode only, something like: DevModeOnlyRoute

Describe alternatives you've considered

No other alternatives came to our mind; any possible solution that does not expose specific routes would work.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Inbox (needs triage)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions