mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
Query.of(entity)构建时传入fields
This commit is contained in:
@@ -14,6 +14,10 @@ import java.util.Map;
|
||||
*/
|
||||
public class JfireELEngine implements ExpressionEngine {
|
||||
|
||||
static {
|
||||
checkEngineExist(Expression.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*/
|
||||
@@ -24,4 +28,8 @@ public class JfireELEngine implements ExpressionEngine {
|
||||
public Object eval(String expression, Map<String, Object> context) {
|
||||
return Expression.parse(expression).calculate(context);
|
||||
}
|
||||
|
||||
private static void checkEngineExist(Class<?> clazz){
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,10 @@ import java.util.Map;
|
||||
*/
|
||||
public class RhinoEngine implements ExpressionEngine {
|
||||
|
||||
static {
|
||||
checkEngineExist(Context.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object eval(String expression, Map<String, Object> context) {
|
||||
final Context ctx = Context.enter();
|
||||
@@ -31,4 +35,8 @@ public class RhinoEngine implements ExpressionEngine {
|
||||
Context.exit();
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void checkEngineExist(Class<?> clazz){
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user