--myjar.jar
--config
----appconfig.xml
I'm trying create maven based java application which can read configuration file from a relative path config\appconfig.xml
The idea here is that, the configuration can be modified without recompiling the application.
My implementation is something like this:
@Service
public class JooxXmlConfigurationServiceImpl implements XmlConfigurationService {
@Value("${configuration.xml}")
private String path;
}
Where the value is fetched from a properties file that is uder src/main/java/app-defaults.properties
It works when the String path
is defined as the complete address like: C:/myprojects/myapp/config/appconfig.xml
but I need to set the path
to be something like config/appconfig.xml