Optional Spring bean references

后端 未结 5 2096
逝去的感伤
逝去的感伤 2020-12-03 17:22

In my application I am using ContextLoaderListener to load context files from many jars using:


    contextConfigLocat         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-03 17:39

    Given that the bean references in your XML config are defined via expression language (EL) you can do the following:

    
    

    which makes use of the BeanExpressionContext.getObject() method. See here for more details.

提交回复
热议问题