Configuration 的loadResources()方法 (采用lazy加载)
1.解释了为什么会加载一些默认文件(*.site.xml)
2.测试了一下用file的方式去读取hdfs文件,不行
else if (name instanceof Path)中,会转换为本地文件,最后变成d:\\hdfs地址
linux下也试了一下,同样是不行的,这种方式暂时行不通,以后这样的还是用文件流的方式来读取,
因为最后都是转换InputStream流的方式来读取,然后交给Document去解析xml文件
1.解释了为什么会加载一些默认文件(*.site.xml)
2.测试了一下用file的方式去读取hdfs文件,不行
else if (name instanceof Path)中,会转换为本地文件,最后变成d:\\hdfs地址
linux下也试了一下,同样是不行的,这种方式暂时行不通,以后这样的还是用文件流的方式来读取,
因为最后都是转换InputStream流的方式来读取,然后交给Document去解析xml文件
3.addResources(Path)这个函数针对的本地文件,注释如下
file-path of resource to be added, the local filesystem is examined directly to find the resource, wit
file-path of resource to be added, the local filesystem is examined directly to find the resource, wit