how to reference a bean of another xml file in spring

前端 未结 6 1354
花落未央
花落未央 2020-12-07 17:30

I have a Spring bean defined in an xml file. I want to reference it from another xml file. How can I go about it?

6条回答
  •  执念已碎
    2020-12-07 18:19

    You reference it exactly as you would reference a bean in the same XML file. If a spring context is composed of several XML files, all the beans are part of the same context, and thus share a unique namespace.

提交回复
热议问题