7--Basic usage of spring--8 ...

Source: Internet
Author: User

7.8 In-depth understanding of beans in containers

7.8.1 Abstract bean and child bean

Extract the same information from multiple <bean.../> configurations into a configuration template------This configuration template is not a real bean, so spring should not create the configuration template, so it needs to be for the <bean.../> The configuration adds abstract= "True"------This is the abstract bean.

Abstract beans cannot be instantiated, and spring containers do not create instances of abstract beans. The value of an abstract bean is inherited, and abstract beans are usually inherited as parent beans.

Abstract Bean is simply a template for configuration information, specifying abstract= "true" prevents spring from instantiating the bean, so the abstract bean can not specify the class attribute.

        

7--Basic usage of spring--8 ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.