我正在关注 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/