Class LifecycleBeanPostProcessor

  • All Implemented Interfaces:
    BeanPostProcessor, DestructionAwareBeanPostProcessor, Ordered, PriorityOrdered

    public class LifecycleBeanPostProcessor
    extends Object
    implements DestructionAwareBeanPostProcessor, PriorityOrdered

    Bean post processor for Spring that automatically calls the init() and/or destroy() methods on Shiro objects that implement the Initializable or Destroyable interfaces, respectfully. This post processor makes it easier to configure Shiro beans in Spring, since the user never has to worry about whether or not if they have to specify init-method and destroy-method bean attributes.

    Warning: This post processor has no way to determine if init() or destroy() have already been called, so if you define this post processor in your applicationContext, do not also call these methods manually or via Spring's init-method or destroy-method bean attributes.