您好,在引入alibaba的fastjson后,调用JSON.toJSONString()会导致Java打开,有人遇到过这个情况吗?现在不想让他出现,因为在服务器上会导致无法读取json的情况,但是本地测试通过了。
代码如下:
<--这是依赖-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.41</version>
</dependency>
在Controller调用JSON.toJSONString()
SimplePropertyPreFilter filter = new SimplePropertyPreFilter(Employee.class, "e_id", "employee_firstname", "employee_lastname", "title", "employee_type");
String employeeJson = JSON.toJSONString(employeeList, filter);
结果后台中出现了这个:
删了JSON.toJSONString()这一行就不会出现Java了。
求助,不清楚原因,也是第一次遇到。