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
When running a static code analysis tool or inspecting/analyzing your code from your IDE, you may have encountered the following warning regarding your @Autowired fields: Field injection is not recommended. This post shows the alternatives to field injection and how to avoid this warning.Field injection is not recommended – Spring IOC2018-02-21 in Java tagged Dependency Injection / Inversion of control (IoC) / Java / SOLID / Spring Framework by Marc Nuri