kingsonfu

如图,获取user.png:

代码实现:

//文件路径,此处static前不能加/,否则解析不到
try {
  //此处的static前不能加/!!!
  file = ResourceUtils.getFile(ResourceUtils.CLASSPATH_URL_PREFIX + "static/images/user.png");
   ...
} catch (FileNotFoundException e) {
e.printStackTrace();
}

 



分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-01-07
  • 2021-06-24
  • 2021-07-25
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-30
  • 2021-07-05
  • 2022-12-23
  • 2021-12-10
  • 2019-12-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案