This post shows how to solve the scoped bean injection problems that arises when injecting a Prototype scoped Bean into a Singleton scoped Bean. It shows the different approaches to solve the problem and the advantages and disadvantages for each of them.Spring Bean Scopes: Singleton with Prototypes2018-05-11 in Java tagged Bean / Java / Scopes / SOLID / Spring Framework / Spring Boot / Testing by Marc Nuri
Blog post showing the different Scopes available in Spring Framework with code demonstrating the use of each of them. Tests included.Spring Bean Scopes: Guide to understand the different Bean scopes2018-04-30 in Java tagged Bean / Java / Scopes / Spring Framework / Spring Boot / Testing by Marc Nuri