[英]Play Framework - How to add a module in existing application
I came across new play module and I would like add it in my existing play application. 我遇到了新的播放模块,我想在现有的播放应用程序中添加它。 Is there any play command associated for this action? 是否有与此操作相关联的播放命令?
Yes, there is a command for it. 是的,有一个命令。 Just run play install #your-module-name#
只需运行play install #your-module-name#
Also read the documentation carefully. 另请仔细阅读文档 。
Per Codemwnci at my question ( How should I be declaring and exporting modules? ), a better way to add modules is when you create your app, like so: 根据我的问题,每个Codemwnci( 我应该如何声明和导出模块? ),添加模块的更好方法是在创建应用程序时,如下所示:
play new myapp --with crud,secure
This adds the applications to dependencies.yml
, which is the preferred place for them these days. 这将应用程序添加到dependencies.yml
,这是他们最近的首选位置。 If you already have an existing app, add for example 如果您已有现有应用,请添加例如
- play -> crud
- play -> secure
to dependencies.yml
and run play dependencies
to install. 到dependencies.yml
并运行play dependencies
来安装。 (Followed by play eclipsify
etc if you're using Eclipse.) (如果您正在使用Eclipse,请依次play eclipsify
等。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.