governator
governator copied to clipboard
Using LifecycleManager is not documented right?
In the docs it says:
- Create an injector using the builder, and then
-
LifecycleManager manager = injector.getInstance(LifecycleManager.class); manager.start();
I'm using version 1.12.0 (from Jan 2016) and from some reason LifecycleManager class doesn't have start() or stop() method.
How should I enable the Lifecycle feature?
the issue is likely that the code above is referencing "com.netflix.governator.LifecycleManager" (governator-core), rather than "com.netflix.governator.lifecycle.LifecycleManager" (governator-legacy) which does have a start() method. We're working to simplify the Governator internals and move away from governator-legacy, but work is not yet complete. In the meantime if you change your imports to use "com.netflix.governator.lifecycle.LifecycleManager", then lifecycle management can be started per the docs.
Sounds good. I think the correct approach would be to document it properly - exactly what you wrote above until you will fix it
I would simply change this page to say: "Make sure you import the correct class which is com.netflix.governator.lifecycle.LifecycleManager
and not com.netflix.governator.lifecycle.LifecycleManager
which is the internal class"
Just stumbled upon this also. Not sure, what is there right import here.
com.netflix.governator.guice.LifecycleInjector
has a start method, while
com.netflix.governator.LifecycleInjector
has not. So what is the correct approch?