Reputation: 7521
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:
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
Upvotes: 0
Views: 73
Reputation: 7521
Found solution with using
<import resource="classpath:applicationContext.xml" />
I used
<import resource="applicationContext.xml" />
Upvotes: 1