美文网首页
Play 项目在IntelliJ IDEA中的配置

Play 项目在IntelliJ IDEA中的配置

作者: 甚了 | 来源:发表于2015-12-29 18:34 被阅读4723次

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 配置

相关文章

网友评论

      本文标题:Play 项目在IntelliJ IDEA中的配置

      本文链接:https://www.haomeiwen.com/subject/jilihttx.html