在网络文件系统上使用Play框架自动重装 [英] Auto-reloading with Play framework on a network filesystem

查看:104
本文介绍了在网络文件系统上使用Play框架自动重装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VirtualBox VM上运行Play框架应用程序,项目源代码位于与主机系统共享的目录中.该框架的自动重新加载功能不起作用.

I'm running a Play framework application on a VirtualBox VM with the project source code in a directory shared from the host system. The auto-reload functionality of the framework doesn't work.

(可能)是由于JNotify无法检测到对源文件的更改所致,因为文件系统不是本地的. NFS和vboxsf都遇到相同的问题.

This is (probably) caused by JNotify being unable to detect the changes to the source files, as the filesystem is not local. Both NFS and vboxsf suffer from the same issue.

有什么办法解决这个问题吗?

Is there any way around this?

Play框架具有内置的回退机制,用于检测无法使用JNotify的系统上的更改.是否可以以某种方式强制选择回退机制? (性能下降是可以接受的.)

Play framework has a built-in fallback mechanism for detecting changes on systems where JNotify is not available. Is it possible to force select the fallback mechanism somehow? (The performance hit would be acceptable.)

还有其他解决方案吗?

推荐答案

我在这里遇到了同样的情况.在Play/SBT控制台中切换到~run(而不是run),绕过JNotify(根据Josh Suereth)并似乎为我解决了这个问题.

I ran into the same situation here. Switching to ~run (instead of run), within the Play/SBT console, bypasses JNotify (according to Josh Suereth) and appears to solve the problem for me.

这篇关于在网络文件系统上使用Play框架自动重装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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