写方立勋的user模块时候
filepath = XmlUtils.class.getClassLoader().getResource("users.xml").getPath();
报错无法获得D:\Program%20Files\...\...\...\
users.xml
路径中多了个%20,所以路径是不正确的
把获取到的路径做以下编码处理就行了:
filepath=URLDecoder.decode(filepath,"utf-8");
编码后的路径无%20,是正确的