每次我对Java代码进行任何更改时,保存文件后都不会反映出来

问题描述

我在我的Java项目中使用Eclipse Neon,每次对Java代码进行任何更改时,在保存文件后(例如:一个简单的syso语句),它都不会反映。我必须做 maven清理和maven安装,然后重新启动启动。

解决方法

将devtools依赖项添加到pom.xml中的项目中(如果是春季启动项目):-

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
</dependency>

并在Eclipse中启用自动构建:-

enter image description here

,

确保已启用pip install --ignore-installed six 中的“自动生成”选项。