简体   繁体   English

Play Framework - 如何在现有应用程序中添加模块

[英]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.

相关问题 如何在Eclipse中将Play Framework添加到现有Web应用程序 - How to add Play Framework into existing web application in Eclipse 如何在现有Java应用程序中添加Python模块 - How to add Python module in existing Java Application 将Play框架模块导入现有的IntelliJ项目 - Importing Play Framework module into existing IntelliJ project Play Framework 1.2:如何添加自定义模块依赖 - Play Framework 1.2: How to add custom module dependencies 在播放框架2.4中添加新的Mongo模块 - add new Mongo module in play framework 2.4 Play Framework 2.4.0-如何将外部Java项目依赖项添加到Play-Java应用程序项目 - Play Framework 2.4.0 - How to add an external java project dependency to play-java application project 如果应用程序具有多个登录页面,则如何使用安全模块(播放框架) - How to use secure module (play framework) if the application is having more than one login page 如何在Play Framework CRUD模块中过滤关联 - How to filter associations in Play Framework CRUD Module IntelliJ 如何将模块添加到现有模块 - IntelliJ how to add module to existing module 如何将Play Framework 2.x模块的托管代码添加到Eclipse依赖项? - How can I add a Play Framework 2.x module's managed code to Eclipse dependencies?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM