Spring-data-mongodb uses MongoTemplate to realize paging query and error report

1 you can output query information during unit test, use swagger2 to test the following errors, debug can also output results normally.
clipboard.png

Mar.24,2021

need to be satisfied in hessian serialization:

  1. Class needs to implement Serializable interface
  2. the class needs to have a nonparametric constructor or a parameter in the constructor with arguments that satisfies the basic type

the generic paging class provided by spring-data you use does not support

clipboard.png

so your solution can only be:

  1. replace other serialization methods of dubbo, protobuf kryo fastJson, etc.
  2. if you manually implement the generic paging class, you won't have these problems
Menu