private static Set < URL > getResourcesFromRoot ( final String rootPath ) { final Set < URL > rets = new LinkedHashSet < URL > ( ) ; String path = rootPath ; if ( path . startsWith ( "/" ) ) { path = path . substring ( 1 ) ; } try { final Enumeration < URL > resources = Thread . currentThread ( ) . getContextClassLoader ( ) . getResources ( path ) ; URL url = null ; while ( resources . hasMoreElements ( ) ) { url = ( URL ) resources . nextElement ( ) ; rets . add ( url ) ; } } catch ( final IOException e ) { LOGGER . log ( Level . ERROR , "get the ROOT Rescources error" , e ) ; } return rets ; }
the URLS under Root path each of which we should scan from .