Closed flavienlaurent closed 4 years ago
Hi, thanks for your feedback. We have received similar requests from other clients as well and will provide an official way to enable/disable extensions in the next version.
Great! Thanks for your response.
Fixed in v3.0.0
First, thanks for your work, Kumuluzee works great and is very promising!
I don't find a proper way to activate or deactivate extensions once there are in dependencies.
For example, I want to use consul as configuration provider in production environment but I would prefer to use a basic configuration file in dev environment. For now (and for test purpose), I'm hacking a bit via reflection the
ConfigurationImpl
in theConfigurationUtil
instance by removing theConsulConfigurationSource
from sources.The same type of problem occurs for other extension like discovery. In production environment, I want to use consul but in dev environment, I would prefer to directly use entry points configured in configuration file. For now, I added a custom annotation with a custom producer. In dev environment, this producer procuces a
WebTarget
to entry points configured in the configuration file but in production environment, the "real"DiscoverServiceProducer
is used to return aWebTarget
.A more elegant way seems to write my own
EeApplication
class which takes care of activation/deactivation via properties:but I'm afraid of side effects for some extensions.
Is there a better way to achieve this kind of activation/deactivation on extensions?