Hi I find below rule is very helpful.
I have some suggestions.
- Some places we need to use spring prototype beans. So can we make this rule ignore classes with annotation @Scope(BeanDefinition.SCOPE_PROTOTYPE) or @Scope(“prototype”).
- Can we add a rule which detects the reference of Java classes( spring beans) marked as @Scope(BeanDefinition.SCOPE_PROTOTYPE) or @Scope(“prototype”) and warn the developers about the bean is being prototype and it should be accessed as prototype. Since in spring all beans are by default singleton and if somebody injects prototype in singleton it should be injected as prototype.