springboot项目打成jar运行classPathResource.getFile()获取文件失败
把
ClassPathResource classPathResource = new ClassPathResource("antisamy/antisamy-ebay.xml");
File file = classPathResource.getFile();
InputStream inputStream = new FileInputStream(file);
改为
ClassPathResource classPathResource = new ClassPathResource("antisamy/antisamy-ebay.xml");
InputStream inputStream = classPathResource.getInputStream();