SpringBoot获取项目绝对路径 String property = System.getProperty("user.dir"); String path = property + "/src/main/resources/static/files";