txlcn-tc/src/main/java/com/codingapi/txlcn/tc/support/p6spy/common/P6Util.java
public static URL locateOnClassPath(String filename) {
    URL result;
    // first try to load from context class loader
    result = Thread.currentThread().getContextClassLoader().getResource(filename);

    // next try the current class loader which loaded p6spy
    if (result == null) {
      result = P6Util.class.getClassLoader().getResource(filename);
    }

    // finally try the system class loader
    if (result == null) {
      result = ClassLoader.getSystemResource(filename);
    }

    return result;
  }
public static URL locateOnClassPath(String filename) {
    URL result;
    // first try to load from context class loader
    result = Thread.currentThread().getContextClassLoader().getResource(filename);

    // next try the current class loader which loaded p6spy
    if (result == null) {
      result = P6Util.class.getClassLoader().getResource(filename);
    }

    // finally try the system class loader
    if (result == null) {
      result = ClassLoader.getSystemResource(filename);
    }

    return result;
  }
public static URL locateOnClassPath ( String filename ) { URL result ; // first try to load from context class loader result = Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( filename ) ; // next try the current class loader which loaded p6spy if ( result == null ) { result = P6Util . class . getClassLoader ( ) . getResource ( filename ) ; } // finally try the system class loader if ( result == null ) { result = ClassLoader . getSystemResource ( filename ) ; } return result ; }
Locates a file on the classpath.

@param filename the relative filePath of the file to load
@return the URL of the file or null if not found
Locates a file on the classpath .