Assuming the class is annotated with @Service , does Spring guarantee a unique instance of the class for injection? Or should I put @Scope("singleton") in every service?
@Service
@Scope("singleton")
From docs
Singleton scope is the default scope in Spring
Therefore, there is no need to set this explicitly.
Here is the discussion I found on CodeRanch:
http://www.coderanch.com/t/586038/Spring/Spring-treat-Service-Singleton
And the answer is from another Stackoverflow post:
fooobar.com/questions/317310 / ...