I am using mybatis to connect to database and i have stored some schema information in external properties file. I have kept this property file somewhere on my disk and referring it in my config.xml
like below
In Config.xml
<properties url="file:///E:/mybatis/sqlmapconfig.properties" />
In my sqlmapconfig.properties
file
schema=test_schema
I do want to make this path configurable by user, meaning users can set an environment like "MyBatis.Config" with value as "E:/mybatis". so that you can refer it in the config.xml file as something like below
<properties url="file:///${env.MyBatis.Config}/sqlmapconfig.properties"/>
I have tried the above snippet but did not pick the property file. Anybody has idea on how we can use system or environment variable in property files in Mybatis context.