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 pla开发者_开发知识库y command associated for this action?
Yes, there is a command for it.
Just run 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:
play new myapp --with crud,secure
This adds the applications to dependencies.yml
, which is the preferred place for them these days. If you already have an existing app, add for example
- play -> crud
- play -> secure
to dependencies.yml
and run play dependencies
to install. (Followed by play eclipsify
etc if you're using Eclipse.)
精彩评论