Announcement Announcement Module
Collapse
No announcement yet.
Usage of import resource in xml Spring configuration file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Usage of import resource in xml Spring configuration file

    Hi,

    I have a doubt and a question concerning the import resource.
    I have a single global Spring configuration file that has several import resource entries. When this global is loaded are all the beans referenced by the resources xml files instanciated too or are they created only when my application program tries to use them ?

    In fact many of these objects are not used by my program, but has it a cost in terms of memory to let these xml files in my application context ?

    Thanks.

  • #2
    Originally posted by jef_1 View Post
    Hi,

    I have a doubt and a question concerning the import resource.
    I have a single global Spring configuration file that has several import resource entries. When this global is loaded are all the beans referenced by the resources xml files instanciated too or are they created only when my application program tries to use them ?

    In fact many of these objects are not used by my program, but has it a cost in terms of memory to let these xml files in my application context ?

    Thanks.
    Set lazy-init="true" to any bean that you don't want instantiated until used.

    Comment

    Working...
    X