java重启静态资源每春季启动重启
有人能告诉我如何删除Eclipse/Spring中静态资源上以前的运行时操作吗
imageDir=new File("C:\\Users\\lukas\\workspace\\uploadingFiles\\src\\main\\resources\\static\\images");
每次下次运行都必须重置“我的资源”中以前的所有运行操作
我正在使用Gradle(STS)。 我在项目中使用的命令(CMD控制台):
gradlew wrapper
gradle build
gradlew bootrun //every time I use this command to run Spring Boot
taskkill /F /PID <PID_NUMBER> //command to stop application
# 1 楼答案
使用ApacheCommonsIO
计划在JVM退出时删除文件
参考: https://commons.apache.org/proper/commons-io/javadocs/api-release/index.html?org/apache/commons/io/FileUtils.html