I have a Java Spring MVC web application. I was using an application.properties file to set a few properties value. Now I am trying to get the properties independent of the war file. I have created a new folder shared/classes under tomcat as shown here.
In the catalina.properties
file I have added shared.loader=${catalina.base}/shared/classes
.
In my root-context.xml
file, I added
<context:property-placeholder location="file:${catalina.base}/shared/classes/application.properties"/>
But I am getting the following error:
ERROR o.s.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: E:\projects\smartwcm\workspace-20163101-eclipse-wp\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\shared\classes\application.properties (The system cannot find the path specified)
How can I fix this issue?