Announcement Announcement Module
Collapse
No announcement yet.
Confusion on best practices when using various modular bean definition files and... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Confusion on best practices when using various modular bean definition files and...

    I know this is pretty newbish, but googling for it often brings up confusing things since there are so many ways to do things in Spring...

    I have my main web spring config located in WEB-INF/spring/appServlet referenced in my web.xml
    <param-value>WEB-INF/spring/appServlet/webmvc-config.xml</param-value>

    Now my question is where is the best place to place the other bean xml config files (yes in this project I'm porting over we have a lot of old xml files so not moving to all annotations just yet.)

    And once they are in that place what's the best way to pull in the initial import?

    So for example right now I have

    Code:
    WEB-INF/spring
        appServlet/
            webmvc-config.xml
        beans/
             myImportDefinitions.xml
             someModule/
                configA.xml
                configB.xml
             someOtherModule/
                configC.xml
    In webmvc-config.xml I can access the initial import using the relative path:

    <import resource="../beans/rtvweb-imports.xml" />

    But I really don't like using relative paths. Is there a better approach I could take? Maybe move all the bean definitions under WEB-INF/classes and then they will just automagically be found if on the classpath?

    Thanks for some clarification as to the best approach.
Working...
X