1

今天我偶然发现了https://github.com/joscha/play-authenticate。我看起来非常棒。对我来说,很难理解发生了什么,我可能需要几天时间。

现在这个插件是为 sql 编写的,但是我们想使用 nosql (mongoDB)。

但在我开始之前,我想问您是否可以简要概述一下我必须更改的内容?

我之所以问是因为我需要进行很多更改,而且我不想在一开始就犯一个大错误,只是为了看到我只需要更改配置文件。


例子:

我会这样开始:

private static ExpressionList<User> getEmailUserFind(final String email) {
    return find.where().eq("active", true).eq("email", email);
}

我会用 Morphia 替换这段代码

例如

//pseudo code
private static ExpressionList<User> getEmailUserFind(final String email) {
        return datastore.createQuery(Some.class).field("active").equal("true").field("email").equal(email)...

    }
4

0 回答 0