Bean definition inheritance

Bean definition inheritance means that you have lot of bean definition in the bean configuration file and you have something that is common across lots of bean. There is a common setter value that has to be initialized across multiple beans and only then bean definition inheritance can be used.

You can have one parent bean that contains all of these common definitions inside it, and then you can inherit all the common bean definitions across the other bean. This parent bean, which has all the common definitions, can be a bean in itself. This parent bean can be made into abstract bean definitions, so there are no beans created for it, and all it does is for the purpose of templating a bean definition.

From a parent bean ...

Get Spring: Developing Java Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.