半猫Coder

Results 1 issues of 半猫Coder

感谢大佬的分享,源码看得头疼,这个简易的项目更方便分析流程 不过有个小问题,这个问题与 SpringBoot 3.0.3 版本中的BUG类似,都是路径中存在空格等字符,经过 `classLoader.getResource` 方法后变成了Unicode编码 SpringBoot仓库对应Issue:https://github.com/spring-projects/spring-boot/issues/34379 在本项目中对应的位置:`com.mafei.spring.MaFeiApplicationContext#scanBeanDefinition` ```java ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); // 取得绝对路径: /Users/mafei007/AppProjects/IdeaProjects/spring_study/out/production/simple_impl/com/mafei/test URL resource = classLoader.getResource(path); File file = new File(resource.getFile()); // 此处进行解码即可 String absolutePath...