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?
Asked
Active
Viewed 285 times
6

Maciej Ziarko
- 11,494
- 13
- 48
- 69

Jérôme Verstrynge
- 57,710
- 92
- 283
- 453
2 Answers
1
Here is a discussion I found on CodeRanch:
http://www.coderanch.com/t/586038/Spring/Spring-treat-Service-Singleton
And an answer from a different Stackoverflow post:

Community
- 1
- 1

Philip Tenn
- 6,003
- 8
- 48
- 85