class SpringUtils {

	public static Resource newPathResource(String location){
		Assert.hasText(location);
		Resource resource = null;
		if(location.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)){
			String classpath = StringUtils.substringAfter(location, ResourceUtils.CLASSPATH_URL_PREFIX);
			resource = new ClassPathResource(classpath);
		}else{
			resource = new FileSystemResource(location);
		}
		return resource;
	}

	private  SpringUtils();

}