Skip to content

Conversation

@askyLYZ
Copy link

@askyLYZ askyLYZ commented Jan 8, 2026

createDirIfNotExist 方法是在应用程序的工作目录下创建目录。
file.transferTo 方法(Tomcat 处理上传文件)在相对路径下,是相对于 Tomcat 的 Base 目录(如 .../work/Tomcat/localhost/ROOT/)进行写入。 这导致了目录创建在一个位置,而文件试图写入到另一个不存在目录的位置,从而抛出 FileNotFoundException。
20260108171045750

createDirIfNotExist 方法是在应用程序的工作目录下创建目录。
file.transferTo 方法(Tomcat 处理上传文件)在相对路径下,是相对于 Tomcat 的 Base 目录(如 .../work/Tomcat/localhost/ROOT/)进行写入。
这导致了目录创建在一个位置,而文件试图写入到另一个不存在目录的位置,从而抛出 FileNotFoundException。
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@askyLYZ
Copy link
Author

askyLYZ commented Jan 8, 2026

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant