Java Reference
In-Depth Information
In the listing that follows, the
SystemStartup
bean instance is injected and calls
from the method are annotated with
@PostConstruct
. The default implementation,
System-Startup
, will be injected for a production deployment.
Listing 12.10. Bootstrap class
In the next listing you see the alternate implementation of
SystemStartup
that's used
during development.
Listing 12.11. Alternate
SystemStartup
class providing a different implementation
In this listing, the class is annotated with the
@Alternative
annotation and extends the
base
SystemStartup
class.
DevelopmentStartup
will be used only if it's enabled.