public class ClassPathResource extends LoadableResource
| 构造器和说明 |
|---|
ClassPathResource(Location location,
String fileNameWithAbsolutePath,
ClassLoader classLoader,
Charset encoding)
Creates a new ClassPathResource.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
boolean |
exists() |
String |
getAbsolutePath() |
String |
getAbsolutePathOnDisk() |
String |
getFilename() |
String |
getRelativePath() |
int |
hashCode() |
Reader |
read()
Reads the contents of this resource.
|
compareTopublic ClassPathResource(Location location, String fileNameWithAbsolutePath, ClassLoader classLoader, Charset encoding)
fileNameWithAbsolutePath - The path and filename of the resource on the classpath.classLoader - The ClassLoader to use.public String getRelativePath()
public String getAbsolutePath()
public String getAbsolutePathOnDisk()
public Reader read()
LoadableResourceread 在类中 LoadableResourcepublic String getFilename()
public boolean exists()
Copyright © 2022. All rights reserved.