I have a Spring bean state. How can I apply my scope to a prototype in my application?
How can I prevent another developer of my project from implementing this bean using a singleton scope?
I know that you can adjust the scope through annotation or through the xml configuration. From what I saw when using Spring 3, the area configured by the annotation is overridden by the area defined manually in xml. How can I apply my scope, either through configuration or programmatically, so that my bean will never be used as a singleton?
I was thinking about inspecting the bean area when starting the application, but this does not seem like an elegant solution.
source share