Question: is there a common pattern in Java to avoid mongoDB injection attacks?

Thanks

Answer: 
You can build MongoDB querys with Javascript in the where clause and here injection can happen. Here explanation how to prevent this: <https://docs.mongodb.com/manual/faq/fundamentals/#how-does-mongodb-address-sql-or-query-injection>
Most of the drivers are setup where you construct queries as the languages representation of BSON documents. What languages do you intend to use mongo in?