Assuming a class is annotated with @Service
, does Spring guarantee a unique instance of the class for injection? Or should I put @Scope("singleton")
on every service?
From the docs
The singleton scope is the default scope in Spring
So there is no need to set this explicitly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With