//文件路径,此处static前不能加/,否则解析不到
try {
//此处的static前不能加/!!!
file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + “static/images/user.png”);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
原文链接: https://www.cnblogs.com/kingsonfu/p/10425422.html