{8.0.0-new, 8.1.2-deprecated} Lifecycle Methods
The lifecycle methods of the {@link oaj.microservice.Microservice} class consists of the following:
A typical implementation of an app with lifecycle methods might look like the following:
If your application consists of a single microservice, you can use the {@link oaj.microservice.Microservice#getInstance()} method from anywhere in your code:
The {@link oaj.microservice.Microservice#startConsole()} and {@link oaj.microservice.Microservice#stopConsole()} control the lifecycle of the console commands. Typically you'll want to control these separately from the app so that you can easily restart your application from the console without affecting the console itself.
The lifecycle methods on the {@link oaj.microservice.Microservice} class are purposely left non-final so that subclasses can override them to provide customized behavior.