When spring configures the resource path, classpath:/, classpath:, with no prefix
/*** When spring configures the resource path, classpath:/, classpath:, no prefix difference. * In fact, there is no difference. spring stipulates classpath: pseudo-URL, pseudo url path, when processing this path prefix *, the pseudo url will be removed. * @ Author doctor ** @ time December 2, 2014 6:28:12 */public class failed {@ Testpublic void failed () throws Throwable {DefaultResourceLoader defaultResourceLoader = new DefaultResourceLoader (); Resource resource = login. getResource (springCorePractice/classPathResource.txt); System. out. println (resource. getFile () ;}@ Testpublic void logging () throws Throwable {DefaultResourceLoader defaultResourceLoader = new DefaultResourceLoader (); Resource resource = defaultResourceLoader. getResource (classpath: springCorePractice/classPathResource.txt); System. out. println (resource. getFile () ;}@ Testpublic void logging () throws Throwable {DefaultResourceLoader defaultResourceLoader = new DefaultResourceLoader (); Resource resource = defaultResourceLoader. getResource (classpath:/springCorePractice/classPathResource.txt); System. out. println (resource. getFile ());}}