String path = ResourceUtils.getURL("classpath:").getPath()+"static/upload";
System.out.println(path);
//本地开发输出/C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps/xxx/WEB-INF/classes/static/upload
//部署到服务器输出/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/xxx/WEB-INF/classes/static/upload
path = URLDecoder.decode(path,"utf-8");//处理空格转化为%20
System.out.println(path);
//本地开发输出/C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps/xxx/WEB-INF/classes/static/upload
//部署到服务器输出/C:/Program Files/Apache Software Foundation/Tomcat 9.0/webapps/xxx/WEB-INF/classes/static/upload