Gson替换掉多漏洞的FastJson

添加依赖:
<!-- gson -->
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.5</version>
    </dependency>

 

测试:
DemoVo vo = new DemoVo();
System.out.println(new Gson().toJson(vo));

 

posted @ 2022-01-25 09:50  贾斯丁哔哔  阅读(252)  评论(0编辑  收藏  举报