Java获取文件后缀名
int dot = filename.lastIndexOf('.');
if ((dot > -1)
&& (dot < (licenceImg.getOriginalFilename().length()))) {
extension = licenceImg.getOriginalFilename().substring(dot + 1);
}
String fileName = System.nanoTime() + "."
+ extension;