I have a project A
that I want to use from a project B
, and I would like to pass some configuration parameters into the project A
using a XML configuration file.
In other words, suppose I am implementing something like my own spring-data-mongo
(for instance) and I want to configure my Mongo instance from a configuration file in which I have defined as follows:
<mongo: mongo host = "$ {mongo.hostname}" port = "$ {mongo.port}">
<mongo: options connections-per-host = "8"
threads-allowed-to-block-for-connection-multiplier = "4"
connect-timeout = "15000"
max-wait-time = "1500"
auto-connect-retry = "true"
socket-keep-alive = "true"
socket-timeout = "60000"
slave-ok = "true"
write-number = "1"
write-timeout = "0"
write-fsync = "false" />
How do I achieve something like this?