例如在连接速度上, SpringBoot + restful :Junit 模拟get方法做测试     VS    java 原生socket  服务器端和客户端之间的通信

 

restful 和socket 在网络连接上的对比

 

    @GetMapping("/find")
    public List<Summary> find(String tag, Timestamp startTime, Timestamp endTime){
            List<Summary> list = repository.find(tag,startTime,endTime);
           return list;
    }

    //不连接数据库
    @GetMapping("/findTest")
    public List<String> findTest() {
            List<String> list = new ArrayList<>();
            list.add("aaaa");
            return list;
    }

        

             Junit测试java原生socket 测试

 

 

                         希望各位大佬给出相应的建议!表示感谢!!

相关文章:

  • 2021-12-08
  • 2021-11-19
  • 2021-08-27
  • 2022-02-07
  • 2021-11-12
  • 2021-08-09
  • 2022-01-14
猜你喜欢
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案