Is it possible load custom part of config from file and automatically load other part of config from classpath, placed inside jar?
I have command line apllication written on java with spring 2.5.6 framework.
Config of apllication consist from 2 parts:
- bigApplicationContext.xml
-
customConfig.xml with import of bigApplicationContext.xml
bigApplicationContext has references to some beans from customConfig.
I placed bigApplicationContext and default customConfig inside jar. Configs loaded by ClassPathXmlApplicationContext. It’s OK
Troubles goes when I want provide additional command line option for my application –pathToCustomConfig
I want to load custom part of config from file and automatically load other part of config from bigApplicationContext, placed inside jar.
Is it possible? Now I have
Configuration problem: Failed to import bean definitions from relative
location
Found solution with using
I used