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
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:
DevModeOnlyRouteDescribe 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