My understanding is that MyBatis's expression parser for XML is unable to handle lambdas/method references. You can try and create a helper method, something like
public static boolean helper(List<String> l) {
return CollectionUtils.exists(l, "APPLE"::equals);
}
then refer it in the XML:
<if test="@some.package.Utils@helper(param.getFruitList())">
tbl.price
</if>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…