Announcement Announcement Module
Collapse
No announcement yet.
Convention over configuration: where do you put your Spring configuration files? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Convention over configuration: where do you put your Spring configuration files?

    I'm interested in what kinds of standards people are using for Spring config file locations, especially when packaging POJO jars.
    I heard in a Spring user's group that the "right" place is under folder "meta-inf/spring", i.e.
    meta-inf/spring/beans.xml
    meta-inf/spring/someOtherBeans.xml

    Is this the common practice? I've recently implemented a different convention, just putting the files in meta-inf/applicationContext.xml. I'm wondering if we should consider using the above convention instead, especially if it's going to make things like OSGI easier to implement.

  • #2
    I generally put them just in the root of the jar. The META-INF/spring is a good location if you are using Spring DM or our dm Server. The META-INF/spring directory is scanned for xml files to use for the ApplicationContext.

    Comment


    • #3
      We store them in a folder called 'spring' at the root of the jar , e.g.

      spring/myproject-beans.xml
      spring/myproject-jms-beans.xml

      Comment

      Working...
      X