如何设置IntelliJ Java App Engine项目以使用服务(模块) [英] How to setup IntelliJ Java App Engine project to use Services (Modules)

查看:100
本文介绍了如何设置IntelliJ Java App Engine项目以使用服务(模块)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成功使用IntelliJ一段时间来开发包含单个服务(以前称为模块)的App Engine项目,但难以设置包含多个服务的项目(默认前端



我了解多模块EAR部署文件夹结构,它与单个WAR结构不同,但我没有已经能够找出如何成功地启动开发服务器与这个配置调试之前我部署。



任何帮助将不胜感激。

解决方案

我的应用程序被构建为一个多模块Gradle项目。我有一个顶级的Gradle Build文件和
三个子项目。一个项目包含EAR项目,两个项目是Goolge App Engine War项目。



我建议您从尝试设置这样的项目开始。你会发现一个很好的例子,在Googles Github上有相应的
项目结构



https://github.com/GoogleCloudPlatform/appengine-modules-sample-java



你将通过运行ear gradle任务将ear部署到您的本地开发服务器appengineRun



您需要将以下条目添加到您的ear gradle构建文件中(保留其他条目)

  appengine {

jvmFlags = ['-Xdebug','-Xrunjdwp:transport = dt_socket, server = y,suspend = n,address = 8000']

}

下一步是配置类似于此的远程调试配置



https: //blackoverflow.com/a/18692212/2062634



启动应用程序后,您必须启动远程调试配置n将连接调试器。

I've been using IntelliJ successfully for quite a while to develop App Engine projects that contain a single service (formerly 'module'), but am having difficulty setting up a project up that contains more than one service (a default front-end service plus one or more backend services).

I understand the multi-module EAR deployment folder structure, which is different from the single WAR structure, but I have not been able to figure out how to successfully launch the development server with this configuration to debug before I deploy.

Any help would be greatly appreciated.

解决方案

My application is structured as a multi module Gradle project. I have a top level Gradle Build file and three subprojects. One project contains the EAR project, and two projects are Goolge App Engine War projects.

I would propose that you start with trying to setup such a project. You will find a good example with a corresponding project structure at Googles Github

https://github.com/GoogleCloudPlatform/appengine-modules-sample-java

You will deploy the ear to your locale dev server by running the ear gradle task appengineRun

You need to add the following entry to your ear gradle build file (keep the other entries)

appengine {

    jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']

}

Next step is to configure a Remote Debug configuration similar to this

https://stackoverflow.com/a/18692212/2062634

After you started your application you have to start your remote debug configuration which will attach the debugger.

这篇关于如何设置IntelliJ Java App Engine项目以使用服务(模块)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆