java - How to configure a Spring bean via an in-place annotation? -


let there proptotype-scope bean injected:

@autowire @customconfig(foo=100, bar="bar") mybean mybean; 

i wish lead initialization steps like:

mybean = new mybean(); mybean.setfoo(100); mybean.setbar("bar"); // let standard configuration applied here 

is possible in such way? without separate xml/java configuration...

i don't want avoid standard xml/java configuration completely, i'd use such setup in addition them. spring 4.


Comments