java - 安装 play 框架 mongodb morphia 模块

标签 java mongodb module playframework

我正在使用以 mongodb 作为后端的 play 框架进行应用程序开发, 我已经在我的 ubuntu 和 windows 上成功安装了 mongodb 和 playframework, 但是如果我想使用 mongodb,我需要 play 框架的 morphia 模块,我已经下载了 morphia 模块并尝试安装,但它给了我这样的错误,

root@ubuntu:~/apps/tmp1# play install morphia
[info] Loading project definition from /root/apps/tmp1/project
[info] Set current project to tmp1 (in build file:/root/apps/tmp1/)
[error] Not a valid command: install (similar: initialize, inspect, shell)
[error] Not a valid project ID: install
[error] Not a valid configuration: install (similar: optional)
[error] Not a valid key: install (similar: initialize, dist, stage)
[error] install
[error]        ^
root@ubuntu:~/apps/tmp1# 

我什至尝试更改 dependency.yml 文件,但是我仍然无法使用它......

最佳答案

看起来您正在使用 play 2。查看 documentation关于吗啡,它明确指出:

This module is for the Play 1.x series only.

您可以使用java来代替吗啡直接驱动。

编辑: 有一个 Play 2 的吗啡插件可用 here

关于java - 安装 play 框架 mongodb morphia 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10911698/

相关文章:

node.js - 导出模块的正确方法

python - 如何检查模块是否可用于导入?

java - 将一个列表存储到另一个列表

java - 如何将字段添加到 ByteBuddy 中的类并在方法拦截器中设置/获取该值

java - 为什么这个线程代码不能在 GUI 中正常工作? [Java Swing] [线程]

java - 按钮单击事件以打开互联网上的书签

mongodb - 如何计算匹配的数组元素

Python 模块导入

mongodb - meteor 集合获取上一个和下一个项目

javascript - 如何仅将错误消息从模型传递到 Controller (Mongoose)?