I solved the problem by replacing my DB name "appDB" by #{mongoUri.database} so the new Bean def for mongoTemplate is:
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongo" ref="mongo"/>
<constructor-arg name="databaseName" value="#{mongoUri.database}"/>
<constructor-arg name="userCredentials" ref="mongoCredentials"/>
</bean>
I don't understand why putting the DB name directly as String is wrong, but anyway for me it works with this XML config.