Announcement Announcement Module
Collapse
No announcement yet.
Best practice for configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best practice for configuration

    Dear all,

    I'm wondering about the best way to configure jobs + other spring beans (datasource, etc.) in integration environment (that is, not in unit testing).

    1) my application configuration looks like below:

    src/main/resources/jobs/xxx-job.xml (job beans)
    src/main/resources/spring/spring-beans1.xml, spring-beans2.xml , ... (all other beans different from job ones).

    2) With this configuration, in unit testing, an abstract test class from which inherit all my tests is in charge of loading all of the spring config files, that is all the files located in src/main/resources/spring/*

    3) But in integration environment, that is without this abstract class, i don't know how to load these files, except from the job config files themselves.

    The result is something like this, with <import> statements:
    jobs/extractionClientsJob.xml

    Code:
    <import resource="classpath*:spring/aws-batch-container.xml"/>
     <import resource="classpath*:spring/aws-batch-infrastructure.xml/>
      <import resource="classpath*:spring/aws-batch-resources.xml"/>
    The problem with this way of doing is that every time i need to add a spring configuration file, i have to add it to all the xxx-job.xml.
    ANd smells not so good...

    Any idea to improve this?

    I would be very grateful for any suggestion,
    Thanks in advance
Working...
X