1******************************************
public void test2() {
String path = null;
StringBuffer sb = new StringBuffer();
try {
//获取项目路径中文乱码,原因是URL对空格,特殊字符(%,#,[]等)和中文进行了编码处理。
//使用URLDecoder.decode(str,"UTF-8")解码,但是只能解决一部分,若路径中含有+,也是不能解决的,原因是URL并不是完全用URLEncoder.encode(str,"UTF-8")编码的,+号被解码后,却变成了空格。
path = URLDecoder.decode(this.getClass().getClassLoader().getResource("json/XX列表XX返回.json").getPath(), "UTF-8");
//可以解决所有的问题,用TestURL().class.getResource("").toURI().getPath(),但是需要处理URISyntaxException
// String testPath = this.getClass().getClassLoader().getResource("json/XX列表XX返回.json").toURI().getPath();
//
// System.out.println(testPath);
File file = new File(path);
FileReader fileReader = new FileReader(file