In Spring-Boot 3.1.0 version after upgrading found the MongoManagedTypes class not found, error thrown due to the private constructor and final keyword to the class added with this release, it doesn't allow to use mongodb with earlier approach of mappingcontext. Kindly take a look and fix the bug, if possible. thank you.

Comment From: wilkinsona

MongoManagedTypes is part of Spring Data MongoDB.