Implementing Null-Safety with Optional<T> in Spring Data MongoDB findBy Methods

In Spring Data MongoDB, any custom “findBy” method expected to return a single entity that might not exist in the database should use…