@Autowired
ResourceLoader resourceLoader;
Resource resource = resourceLoader.getResource("file:c:\\testing.txt");
Resource resource = resourceLoader.getResource("url:http://www.yourdomain.com/testing.txt");
Resource resource = resourceLoader.getResource("classpath:com/mkyong/common/testing.txt");
标签:getResource,resource,示例,Spring,resourceLoader,testing,Resource,txt
From: https://www.cnblogs.com/lovedaodao/p/16640227.html