如何创建一个播放模块? [英] How does one create a Play Module?
问题描述
Play 框架文档在模块创建方面有点薄弱.
The Play framework documentation is kind of weak when it comes to module creation.
- 如何创建模块?
- 我听说大型应用程序可以拆分为多个模块,怎么做?
- 模块可以/不能做什么?(任何访问低级 API 的权限?)
- 播放模块可以公开抽象的 JPA 类吗?
- 打包模块的最佳方式是什么?
- 如何部署/分发播放模块?
我想你明白了……告诉我们所有关于使用 Playframework 的模块.
I think you get the idea... tell us all about Modules using the Playframework.
推荐答案
- 如何创建模块?
- 我听说大型应用程序可以拆分为多个模块,怎么做?
- 模块可以/不能做什么?(任何访问低级 API 的权限?)
- 播放模块可以公开抽象的 JPA 类吗?
- 打包模块的最佳方式是什么?
- 如何部署/分发播放模块?
播放新模块
好吧,您将具有哪些功能的组件(例如安全性或用户管理)放在一个模块中.此模块将由您的应用引用.
Well you put components which functionality, for example security or user-management in a module. This module will be referred by you app.
没有什么特别的事情可以用模块完成,不能直接在你的应用程序中完成.因此,如果您只需要 1 个应用程序中的特殊功能,您可以直接在那里编程.
There are no special things that can be done with a module, with can't be done in your app directly. So if you need a special feature only in 1 app you can program it there directly.
没有限制,你可以在那里声明抽象类.和图书馆一样.
There are no limits, you can declare there abstract-classes. Same as in a library.
播放构建模块
我的意思是在讨论组中有一个插件可以让你运行一个私有存储库.如果它是出于普遍兴趣并且您想贡献它整个社区将其注册为 playframework.org,请参阅 指南.
I mean in the discussion group there was plugin which enables you to run a private repository. If it was from general interest and you want to contribute it the whole community register it as a playframework.org, see the guide.
[更新] 我从 google-group.src
文件夹用于非特定播放和播放插件的静态实用程序类.它们将被编译为 jars 并放入 lib 目录中.
[UPDATE] I copied some information about the src
-folder from google-group. The src
-folder is for static utility-classes which are not play-specific and Play plugin. They will compiled as jars and put into the lib directory.
尼尔斯
这篇关于如何创建一个播放模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!