Portées Bean : Singleton, Prototype et autres

La portée d'un bean définit le nombre d'instances créées par Spring et leur durée de vie. La portée par défaut – et de loin la plus courante – est singleton : une instance par ApplicationContext. D'autres étendues répondent à des besoins spécifiques : prototype pour les objets avec état par utilisation et demande/session pour les applications Web.

Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.