From Spring doc:
7.5.2 (...) As a rule, use the prototype scope for all stateful beans and the singleton scope for stateless beans.
The case:
I have standalone application which needs to store state (e.g. some VERY simple cache implemented as simple Map). In my opinion the simplest solution is to create Sping Bean with singleton scope and put there HashMap/ConcurrentHashMap and add get/set methods which are thread-safe.
Is is good solution/practice or not? If not - what is proper way to do it?