I'm building a backend service powered by Spring Batch which enables to define and Job
s.
Currently, I have several jobs, that essentially, aren't related one to another.
So,
- I have one
application.properties
file that contains all the properties for all jobs - Packages are bloated with classes that aren't related to each other.
So I thought about separating Jobs to different Maven modules and to have an engine
module that gathers them all to one jar.
The problem I was facing is that Spring wouldn't load automatically these application.properties
from the other modules.
i.e. $Value("${some.module.property}")
will fail the application (engine.jar
) as this property isn't found in the application.properties
of the engine
module.
I've understood that there might be some solutions for that problem, but my main question is:
Is it a good idea to make this separation, or is it bearable to have all the classes and configurations in one single project?