Field injection into Spring beans - bad idea?

Hi Philipp,

Does this work if we define the delegate expressions with @Scope(value=“prototype”) . Reason to use this approach is i have other autowired items in my delegate expression and this approach helps in reducing the customization needed .

In my testing if the delegate expression was singelton the injected values were getting overriden but with scope prototype i dont see the inject values getting overwritten as it creates a new instance every time . Let me know your thoughts .

Thanks
Dinesh

6 Likes