int dot = filename.lastIndexOf('.');
if ((dot > -1) && (dot < (licenceImg.getOriginalFilename().length()))) { extension = licenceImg.getOriginalFilename().substring(dot + 1); } String fileName = System.nanoTime() + "." + extension;本文共 284 字,大约阅读时间需要 1 分钟。
int dot = filename.lastIndexOf('.');
if ((dot > -1) && (dot < (licenceImg.getOriginalFilename().length()))) { extension = licenceImg.getOriginalFilename().substring(dot + 1); } String fileName = System.nanoTime() + "." + extension;转载于:https://www.cnblogs.com/lanliying/p/4914497.html