What are the ways to mark a bean (Prototype) in Spring for deletion?

15 Views Asked by At

When we specify a bean with a - prototype scope, Spring does not monitor the lifecycle of such a component.

However, I cannot use scope Request or Session.

How can we tell Spring that such a component needs to be marked for deletion? If I missed something and there is a misunderstanding of how it works correctly, Please tell me.

What ideas does anyone have?

0

There are 0 best solutions below