java - 如何自动重新加载 App Engine 开发服务器?

标签 java google-app-engine maven

我正在关注 tutorial on the App Engine website for 'Google Cloud Endpoints' in Java .一切正常,我可以使用 mvn appengine:devserver 运行开发服务器。问题是当我对文件(例如,任何 java 文件)进行任何更改时,开发服务器不会自动重新编译。我需要 ctrl-c 来终止开发服务器并在我所做的每次代码更改后重新启动它。

有没有办法让 maven 自动检测我项目中任何文件的更改,并让它自动重建并重新启动开发服务器?

最佳答案

不幸的是没有。如果您想要在您的开发服务器上执行此操作,则需要使用 Python。

我遇到了同样的问题,App Engine 没有提供真正的解决方法来帮助您解决这个问题。

来自“为 Eclipse 使用 Google 插件”:

With Eclipse, you can leave the server running in the debugger while you make changes to source code, JSPs, static files and appengine-web.xml. When you save changes to source code, Eclipse compiles the class automatically, then attempts to insert it into the running web server dynamically. In most cases, you can simply reload the page in your browser to test the new version of the code. Changes to JSPs, static files and appengine-web.xml are recognized by the development server automatically, and also take effect without restarting the server. If you change web.xml or other configuration files, you must stop and start the server for the changes to take effect.

( https://developers.google.com/appengine/docs/java/tools/eclipse#Running_the_Project )

Java 中没有可比性(来自“Java 开发服务器”的链接)(https://developers.google.com/appengine/docs/java/tools/devserver)

关于java - 如何自动重新加载 App Engine 开发服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25008594/

相关文章:

maven - Windows 控制台 : Maven archetype list is too long

javascript - Google 脚本 POST 方法与 poloniex api 调用的 JAVA 不匹配

java - 使用 HTTPURLConnection 提交表单

java - Python 和 Java 之间的 For 循环区别

google-app-engine - App Engine 作为 OAuth2 提供者

python - 如何在 Python 中检查神秘的反序列化对象

java - 使用本地更改覆盖 Maven 依赖项时发生冲突

java - 应用程序部署在 jboss 上,但当我尝试访问时出现 404 错误

java - 如何在与 Maven 的 war 中更新 MANIFEST

google-app-engine - 为 Google App Engine 转换 pfx 文件