详情1
spring cloud使用feign调用服务提供者时出现feign.RetryableException: Read timed out executing POST.....异常,按照网上添加
ribbon: ReadTimeout: 60000 ConnectTimeout: 60000
还是报Read time out的错,排查原因是数据库客户端上有个语句执行未提交,占用了表资源,导致服务提供者与数据库交互时卡住了,最终连接超时,服务消费者Read time out。
解决办法很简单,提交客户端上的执行事务;
详情2
mybatis使用example的Criteria对象查询对象集合时报java.lang.ClassCastException: com.ww.model.OpenLc cannot be cast to com.ww.model.OpenLcWithBLOBs......异常,其中OpenLcWithBLOBs是OpenLc的子类。
排查原因是调用查询的方法错误;
解决办法是xxxMapper.selectByExample(example)改为xxxMapper.selectByExampleWithBLOBs(example);