Now I want to get the path of invoice.pdf file How to
get:
import org.springframework.util.ClassUtils;
public class PrintController {
public void monitoringPrint() {
//获取项目classes/static的地址
String staticPath = ClassUtils.getDefaultClassLoader().getResource("static").getPath();
File file=new File(staticPath+"/invoice.pdf");
}
}