Assert.hasText(this.defaultServletName,"Unable to locate the default servlet for serving static content. Please set the 'defaultServletName' property explicitly.");
else{
thrownewIllegalStateException("Unable to locate the default servlet for serving static content. "+
"Please set the 'defaultServletName' property explicitly.");
Assert.isTrue(path.exists(),path.getDescription()+" is not a valid resource location as it does not exist.");
Assert.isTrue(!StringUtils.hasText(path.getFilename()),path.getDescription()+" is not a valid resource location. Resource paths must end with a '/'.");