I'm trying to refactor an old application in order to build it once and deploy it everywhere. The issue that I'm facing like now is the properties file, taken by ibatis could not understand any placeholder for any environment variables. So theoretically I would need something like this:
<properties url="file:///${sys:catalina.home}/tools/apache-tomcat-8.5.70/data/tomapps/proj.properties"/>
Something that is in similar fashion like log4j2 understands:
<File name="LogToFile" fileName="${sys:catalina.home}/logs/proj.log">
Ok, so this is the context. log4j2 understand this, but ibatis not at all.. Not even relative path from linux: ~/specific/path
So I've took a look over this one: Using Environment variables in Mybatis properties file , which is a good solution if you want to switch everything from xml style to java.
But in my case this is an old applications with many mappers defined in xml files, and I prefer to leave as it is.