java - Spring, load bean with specific dependency -


is possibile load bean (scope "prototype") telling spring create using specific dependency?

example:

  • the dependencies, "storea" , "storeb"
  • the bean want load, "service"

can tell spring load "service" "storea" , "storeb"?

actually solution i've found load 2 different application contexts each 1 common set of <include .../> directives , specific 1 i've declared stores (so each application context has 1 declaration of store). can same thing using single application context?

you can refer specific beans using id, when autowiring use the

 @qualifer("somebeanid") 

or within spring context use 'ref'/'ref-local'


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -