比如
"//winkong-pic.oss-cn-qingdao.aliyuncs.com/pic/test/winkong/2021/12/09/hello%281%29.pdf"
String substring = fileUrl.substring(fileUrl.lastIndexOf("."));
结果是.pdf
String substring = fileUrl.substring(fileUrl.lastIndexOf(".")).substring(1);
去掉.