|
|
Obtaining the Application root directory path
Hi,
I'd like to get hold of a String representation of the application root directory from my Spring application context, (e.g. 'C:\SpringApps\myApp\'). I'd be especially interested in any method that will allow me to inject this from applicationContext.xml.
Thanks.
Craig
You'll have to experiment with this but if you have control over the luncher you can use that one to detect the applicationContext rootpath (you already know what appContext to load so you can store the path somewhere or injected it manually inside one of the appCtx's beans) or you can try and use File(quot;./') to determine the local folder. However this may not be the appCtx root (for example one might bootstrap the appContext from another folder)... |
|