Error evaluating expression 'startPageIndex!=null and !startPageIndex.isEmpty() and endPageIndex!=null and !endPageIndex.isEmpty()'. Cause: org.apache.ibatis.ognl.MethodFailedException: Method "isEmpty" failed for object 1 [java.lang.NoSuchMethodException: java.lang.Long.isEmpty()]
时间: 2024-02-04 22:04:05 浏览: 29
这个错误的原因是 `Long` 类型没有 `isEmpty()` 方法,而你在 OGNL 表达式中尝试调用了 `isEmpty()` 方法。
如果你想检查 `Long` 类型是否为 `null` 或者空值,你可以使用以下表达式:
```
startPageIndex != null and endPageIndex != null
```
这个表达式会检查 `startPageIndex` 和 `endPageIndex` 是否都不为 `null`。
如果你想检查 `String` 类型是否为空,你可以使用以下表达式:
```
startPageIndex != null and !startPageIndex.isEmpty() and endPageIndex != null and !endPageIndex.isEmpty()
```
这个表达式会检查 `startPageIndex` 和 `endPageIndex` 是否都不为 `null`,并且是否都不为空字符串。