gpt4 book ai didi

java - 安装 play framework mongodb morphia 模块

转载 作者:可可西里 更新时间:2023-11-01 10:01:25 25 4
gpt4 key购买 nike

我正在使用以 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#

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

最佳答案

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

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

您可以使用 java 而不是使用吗啡直接驱动程序。

编辑:有一个适用于 play 2 的吗啡插件可用 here

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com