Results 1 to 3 of 3

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

  1. #1
    Join Date
    Jan 2008
    Location
    Merion, Pa
    Posts
    65

    Question 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. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jan 2008
    Location
    San Diego
    Posts
    780

    Default

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •