Can we update mongoDB connection dynamically in mongoTemplate using with Java

I am having a bean created for MongoTemplate with MongoDbFactory and want to change connection url without restarting the underlying server