Play 项目在IntelliJ IDEA中的配置

IntelliJ IDEA 配置Play项目

Play 提供命令将Play应用转化成一个 IntelliJ IDEA 模块

$> play idealize [myApp]


配置流程

  • 创建一个单模块的IntlliJ IDEA.
    1. $> play new [myApp] ; 创建Play项目
    2. $> play idealize [myApp] ; 创建IDEA模块,该命令会生成一个.ipr文件
    3. 在IntelliJ IDEA中选择.ipr文件打开项目
  • 配置运行参数
    1. 打开 Run 菜单, 选择 Edit Configurations .
    2. Default -> Apllication -> Add New Configuration .
    3. Main Class [play.server.server]
    4. VM options [-Dapplication.path="."]
    5. Working directory [/path/to/application]
    6. 删除 Make
  • 配置测试运行环境*
    1. 添加 VM options 配置: [-Dplay.id=test].
    2. Open Module Settings -> Dependencies -> Add.. -> Single-Entry Module Library 选择:[$PLAY_HOME/modules/testrunner/lib/play-testrunner.jar]

IntelliJ IDEA 配置

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容