ResourceUtils:查找文件系统中的本地资源文件,框架内部使用。 #getURL ResourceUtils.getURL(location) #校验logConfig是否存在 ResourceUtils.getURL(logConfig).openStream().close();
框架外开发可以使用
org.springframework.core.io.ClassPathResource
org.springframework.core.io.FileSystemResource
org.springframework.core.io.UrlResource
PropertyPlaceholderHelper:解析带有spring占位符的字符串