Din mongo db-factory identificerer ikke hvilken MongoDB database IP den skal bruge.
Prøv at bruge en db-fabrik, der refererer til mongoTemplates værdi <constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
:
<mongo:mongo id="mongo" host="10.125.0.68" port="27017" />
<mongo:db-factory id="mongoDbFactory"
host="10.125.0.68"
port="27017"
username="admin"
password="xxx"
dbname="test"
mongo-ref="mongo" />
Dette burde også virke:
<mongo:mongo id="mongo" host="10.125.0.68" port="27017" />
<mongo:db-factory dbname="test" mongo-ref="mongo" />