public static Properties getResourceAsProperties(String resource) throws IOException {
        Properties props = new Properties();
        InputStream in = null;
        String propfile = resource;
        in = getResourceAsStream(propfile);
        props.load(in);
        in.close();
        return props;
    }
Returns a resource on the classpath as a Properties object

@param resource
           The resource to find
@throws IOException
            If the resource cannot be found or read
@return The resource
metamorphosis-commons/src/main/java/com/taobao/metamorphosis/utils/ResourceUtils.java