在开发项目过程中使用mybatis_plus的lambdaqureywapper做查询条件时报错:
can not find lambda cache for this property [action] of entity [cn/com/systec/wecomchatmanager/modules/session/repo/entity/Conversation.java]
经过查询资料明白是mybatis_plus的一个坑,只需要在报错的代码之上增加一行
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), “”), TeamWorkerSearch.class) ;
这一行就行,其中TeamWorkerSearch 是你要做条件的entity 对象
具体原理参考这位大佬的博客:https://blog.csdn.net/qq_36491545/article/details/109091325
问题解决完成后发现一个很奇怪的点,我将上面这行代码注释掉之后,启动依然成功了,并没有报之前的错误,不是很理解为什么会出现这种情况