如何自动重新加载App Engine开发服务器? [英] How to auto reload app engine dev server?

查看:103
本文介绍了如何自动重新加载App Engine开发服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循App Engine网站上有关"Google Cloud Endpoints"的教程.在Java中.一切正常,我可以使用mvn appengine:devserver运行开发服务器.问题是,当我对文件(例如,任何Java文件)进行任何更改时,开发服务器都不会自动重新编译.我需要按ctrl-c杀死开发服务器,并在每次进行代码更改时重新启动它.

Im following the tutorial on the App Engine website for 'Google Cloud Endpoints' in Java. Everything works fine and I can run the development server using mvn appengine:devserver. The problem is that when I make any changes to a file (for example, any java file) the dev server doesnt automatically recompile. I need to ctrl-c to kill the dev server and restart it for every code change I make.

是否可以让Maven自动检测项目中任何文件的更改,并使其自动重建并重新启动开发服务器?

Is there a way to have maven automatically detect changes to any files in my project and have it automatically rebuild and restart the dev server?

推荐答案

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

Unfortunately no. If you want this behavior on your dev server, you need to use Python.

我遇到了同样的问题,App Engine并没有提供真正的解决方法来帮助您做到这一点.

I run in the same issue and there is no real workaround provided by the App Engine to help you doing this.

来自使用Eclipse的Google插件":

From the "Using The Google plugin for Eclipse":

使用Eclipse,您可以在更改源代码,JSP,静态文件和appengine-web.xml的同时让服务器在调试器中运行.将更改保存到源代码后,Eclipse会自动编译该类,然后尝试将其动态插入到正在运行的Web服务器中.在大多数情况下,您只需在浏览器中重新加载页面即可测试新版本的代码.开发服务器会自动识别对JSP,静态文件和appengine-web.xml的更改,这些更改也将在不重新启动服务器的情况下生效.如果更改了web.xml或其他配置文件,则必须停止并启动服务器才能使更改生效.

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中没有可比的东西(来自"The Java Development Server"的链接)( https://developers.google.com/appengine/docs/java/tools/devserver )

There is NOTHING comparable in Java (link from "The Java Development Server") (https://developers.google.com/appengine/docs/java/tools/devserver)

这篇关于如何自动重新加载App Engine开发服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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