perwendel / spark

A simple expressive web framework for java. Spark has a kotlin DSL https://github.com/perwendel/spark-kotlin
Apache License 2.0
9.63k stars 1.56k forks source link

Why we prevent to access routes in Service class ? #1140

Open duymap opened 4 years ago

duymap commented 4 years ago

I'm having problem to remote route at the run time ( don't want to restart server ). However I was not able to find the way to remote route in spark server.

The problem is Service class is final which was not inherit and routes is protected was not accessible, so can not use method 'remove' in Routes.

Is that possible to have it public in next release 'public Routes routes' or have a getter to access it ? That would be big helpful feature.

I've made PR: https://github.com/perwendel/spark/pull/1141 for this change. If you think make sense , please approve it.

Thanks.