//单独执行表达式 ok
Map<String, Object> params = new HashMap<String, Object>();
params.put("unitcode", "10");
params.put("aa", "10");
params.put("bb", "10");
params.put("cc", "10");
params.put("d", "10");
params.put("e", "10");
Object result = MVEL.eval("\"db\"+unitcode", params);
System.out.println(result);
System.out.println(new Date());
////////----------------2ok 流的方式必须执行才能进行返回
String filePath="D://rule.mvel";
File f = new File(filePath);
Resource r = new FileSystemResource(filePath);
InputStream is;
try {
is = r.getInputStream();
java.io.Serializable s = MVEL.compileExpression(new String(ParseTools.readIn(is, null)));
Map vrs = new HashMap();
vrs.put("unitcode", "20");
VariableResolverFactory vrfactory = new MapVariableResolverFactory(vrs);
//String rets = (String)MVEL.executeExpression(s, null, vrfactory);
String rets = (String)MVEL.executeExpression(s, vrs);
System.out.println(rets);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}