本文整理了Java中org.apache.commons.logging.LogFactory.getResources()
方法的一些代码示例,展示了LogFactory.getResources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogFactory.getResources()
方法的具体详情如下:
包路径:org.apache.commons.logging.LogFactory
类名称:LogFactory
方法名:getResources
[英]Given a filename, return an enumeration of URLs pointing to all the occurrences of that filename in the classpath.
This is just like ClassLoader.getResources except that the operation is done under an AccessController so that this method will succeed when this jarfile is privileged but the caller is not. This method must therefore remain private to avoid security issues.
If no instances are found, an Enumeration is returned whose hasMoreElements method returns false (ie an "empty" enumeration). If resources could not be listed for some reason, null is returned.
[中]给定一个文件名,返回指向该文件名在类路径中出现的所有URL的枚举。
这就像类加载器一样。getResources,但该操作是在AccessController下完成的,因此当该文件具有权限但调用方没有权限时,该方法将成功。因此,此方法必须保持私有,以避免安全问题。
如果找不到实例,则返回一个枚举,其hasMoreElements方法返回false(即“空”枚举)。如果由于某种原因无法列出资源,则返回null。
代码示例来源:origin: commons-logging/commons-logging
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: robovm/robovm
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: camunda/camunda-bpm-platform
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: org.apache.openjpa/openjpa-all
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: MobiVM/robovm
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: apache-logging/commons-logging
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: Nextdoor/bender
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: ibinti/bugvm
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.commons.logging
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: com.gluonhq/robovm-rt
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: com.bugvm/bugvm-rt
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
代码示例来源:origin: FlexoVM/flexovm
URL propsUrl = null;
try {
Enumeration urls = getResources(classLoader, fileName);
内容来源于网络,如有侵权,请联系作者删除!