Inheritance in spring