title: Moving mybatis property file to a custom location in tomcat
body: <p>I have a web application which needs mybatis to connect to a sql server.</p>
  
  <p>I have a separate property file as jdbc.properties which contains the dburl, username, password etc. and mybatis-config.xml file has following to read that </p>
  
  <pre><code>    &lt;properties resource="jdbc.properties"/&gt;
  </code></pre>
  
  <p>If I add jdbc.properties file to the src folder it works fine.</p>
  
  <p>But I have several other property files located at "catalina_home/bin/config" folder so I would like to move my jdbc.properties file also to that location.</p>
  
  <p>But mybatis is not able to read the property file from their no matter how I changed the path to the resource.</p>
  
  <p>However if I moved the jdbc.properties file to the "catalina_home/lib" folder it works. Therefore then I tries resource path like this "../bin/config" but it didn't worked either.</p>
  
  <p>My question is, can I move the jdbc.properties file to the bin/config folder and let mybatis to read it from there.</p>
  
  <p>EDIT: Since my production environment may change its CATALINA_HOME location I cannot give the full path to the config file location.</p>