Mybatis USES lazy step loading to cause json conversion exception
-
anomaly description strong>
No serializer found for class org. Apache. Ibatis. Executor. Loader. The javassist. JavassistProxyFactory... code>
p> li>
-
solve abnormal strong> * * * p>
in distributed query each related bean class strong> add annotation
@ JsonIgnoreProperties (value = {} "handler") code> p> li>
-
reason
lazy loading is you have to use data will give you query 0, but 1 directly query object 2 into json string will lead to 3 results have not been query out of json4, This is what causes the interface 500 exception. Note : object does not load SQL query, only when output this object is use this data 0 will be 1 query 2 from the database and assign data to dependent object
3
4
5