Saturday, December 12, 2020

Post Construction and Pre Destroy

Very important is being able to define methods that can be called immediately after an instance is created and before that instance is destroyed. We annotate these methods with @PostConstruct and @PreDestroy. These methods must be no-arg. The former will be called after a constructor and the latter will be called right before the instance is destroyed

No comments:

Post a Comment