1. 程式人生 > >springboot獲取靜態資源的路徑

springboot獲取靜態資源的路徑

String path = ClassUtils.getDefaultClassLoader().getResource("").getPath();
UploadMedia.upload(path+"static/1.png",token,"image");