Spring: Getting FactoryBean object instead of FactoryBean.getObject()

前端 未结 2 1816
轮回少年
轮回少年 2020-12-31 10:06

Short question: If I have class that impelemnts FactoryBean interface, how can I get from FactoryBean object itself instead of FactoryBean.getObject()?

2条回答
  •  Happy的楠姐
    2020-12-31 10:42

    You can get the factory bean itself using the & syntax in the spring config:

    
    

    as opposed to:

    
    

提交回复
热议问题