grails项目启动时的Disconnected from the target VM, address: '127.0.0.1:xxxxx'错误

今天在启动(debug方式)grails项目时,突然出现了一个错误

Connected to the target VM, address: ‘127.0.0.1:63073‘, transport: ‘socket‘

Disconnected from the target VM, address: ‘127.0.0.1:63073‘, transport: ‘socket‘

大意就是连接不上目标虚拟机了

在我的理解下,grails项目编译类似于一种缓存的机制,避免项目代码重复编译影响效率,

因为每次debug模式启动项目,程序会临时启动一个监听端口,监听该端口代码变化

所以由于该项目之前已经经过编译,该缓存仍然存在.VM端口已固定,这个临时端口连接不上虚拟机的固定端口.

以上为我个人的理解.

解决方式如下

清除grails编译文件: 执行grails clean命令即可.

文章来自:https://www.cnblogs.com/pp2018/p/8572826.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3