r cannot be resolved to a variable和resource directory does not exist

代码中提示R cannot be resolved to a variable错误这个问题,

输出错误信息resource directory XXXXXX does not exist,我遇到的时候是因为我文件夹命名包含中文了。

之前都是重新生成一下r文件,clean。但这次这个操作没有起作用,找了会找到了这个,说目录有中文。汗~~

特此记录下



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误的原因是指定的 class path resource [processes/] 无法解析为 URL,因为它不存在。这个错误通常在上传功能中出现,当打包并上传应用程序时。根据引用,这个错误是由于在打包后,指定的路径无法找到而引起的。为了解决这个问题,可以尝试以下方法: 1. 检查上传路径:确保上传路径的文件夹或目录存在,并且文件夹的权限设置正确。根据引用的解决办法,在配置文件中添加自定义静态资源映射,指定正确的上传路径。根据你的操作系统选择合适的路径配置,比如 Windows 下的上传路径是 D:/uploads/,Linux 下的上传路径是 /uploads/。 2. 检查资源位置配置:确保在配置文件中正确地配置了静态资源位置,包括 classpath、文件路径等。根据引用的配置示例,可以设置 spring.resources.static-locations 的值为 classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${windows.upload.path},file:${linux.upload.path}。 3. 检查资源存在性:确保要上传的文件或资源实际上存在于指定的路径中。如果资源不存在,将无法解析为 URL,从而导致这个错误。 总结起来,解决这个错误的关键是确保上传路径和资源位置的设置正确,并且实际的上传文件或资源存在于指定的路径中。通过检查以上几个方面,你应该能够解决 "class path resource [processes/] cannot be resolved to URL because it does not exist" 的错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [class path resource [processes/] cannot be resolved to URL because it does not exist](https://blog.csdn.net/WGH100817/article/details/101719717)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [上传文件 class path resource [] cannot be resolved to URL because it does not exist](https://blog.csdn.net/qq_37975021/article/details/106940168)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值