jerryshell / live-teaching-platform

在线教学直播平台,结构简单,代码易懂,适合参考
GNU General Public License v3.0
110 stars 50 forks source link

作者你好,请问我在运行项目后,当上传视频的时候,idea会报如下错误提示,请问该如何解决 #7

Closed hs-huang closed 3 years ago

hs-huang commented 3 years ago

java.io.IOException: java.io.FileNotFoundException: C:\Users\hxj\AppData\Local\Temp\tomcat.5069881156583143821.8080\work\Tomcat\localhost\ROOT\home\jerry\Videos\fe035f8d-fd88-460d-aeda-2456958dd249.mp4 (系统找不到指定的路径。) at org.apache.catalina.core.ApplicationPart.write(ApplicationPart.java:122) at org.springframework.web.multipart.support.StandardMultipartHttpServletRequest$StandardMultipartFile.transferTo(StandardMultipartHttpServletRequest.java:255) at cn.jerryshell.liveteaching.service.VideoService.uploadVideo(VideoService.java:24)

jerryshell commented 3 years ago

根据自身环境修改配置文件:src/main/resources/application.properties

hs-huang commented 3 years ago

根据自身环境修改配置文件:src/main/resources/application.properties

能再具体一点嘛,我还是不知道怎么下手改。下面这些配置,为什么不能跟你的项目一样呢

直播资料文件存放路径

live.materialFilePath=/home/jerry/Lives/material

作业文件存放路径

homework.filepath=/home/jerry/temp

hs-huang commented 3 years ago

根据自身环境修改配置文件:src/main/resources/application.properties

能再具体一点嘛,我还是不知道怎么下手改。下面这些配置,为什么不能跟你的项目一样呢

直播资料文件存放路径

live.materialFilePath=/home/jerry/Lives/material

作业文件存放路径

homework.filepath=/home/jerry/temp

jerryshell commented 3 years ago

程序不会自动创建文件夹,如果使用不存在的路径就会报错

而且当时我的开发环境是 Linux,路径写法和 Windows 完全不一样

jerryshell commented 3 years ago

Close inactive issue.