Scopes
![](https://springboot.kitboga.net/wp-content/uploads/2024/06/image-3.png)
Prototype should be used for stateful beans and Singleton for stateless beans.
For Prototype, destruction lifecycle callback are not called, prototype scope object must be cleansed manually.
@Bean
@Scope("prototype")
public Person personPrototype() {
return new Person();
}