Is it possible from Spring to inject the result of calling a method on a ref bean?

前端 未结 3 475
清歌不尽
清歌不尽 2020-12-07 14:38

Is it possible from Spring to inject the result of calling a method on a ref bean?

I\'m trying to refactor some cut/pasted code from two separate projects into a co

3条回答
  •  -上瘾入骨i
    2020-12-07 14:55

    The nicest solution is to use Spring 3's expression language as described by @ChssPly76, but if you're using an older version of Spring, it's almost as easy:

    
       
          
             
          
       
    
    

提交回复
热议问题