Announcement Announcement Module
Collapse
No announcement yet.
a simple question "local" and "bean" Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • a simple question "local" and "bean"

    what is the different between <ref local="some beanid" /> and <ref bean="some beanid" />???

  • #2
    <ref local="some beanid" /> assumes there is a bean with id "some beanid" inside the same XML file while <ref bean="some beanid" /> accepts a bean with id="some beanid" or name="some beanid" located inside the whole applicationContext.

    ref local is good because is enforces check through the DTD on the XML configuration and should be used as much as possible - however, when you have an applicationContext made out of several files (usually the case in complex projects) ref bean will make more sense.

    Comment


    • #3
      thank you very much

      Comment

      Working...
      X