jFinal的小知识点总结

sql批处理

 // 批处理sql
List<String> sqlList = new ArrayList<String>();
sqlList.add("delete from nice where note = '111'");
sqlList.add("delete from nice where note = '222'");
sqlList.add("delete from nice where note = '333'");
Db.batch(sqlList, 3);

 Action获取路径

// 获取项目路径{例如:nice}
String projectPath = getRequest().getContextPath();
// 获取方法名路径{例如:action/searchMethod}
String methodPath = getRequest().getServletPath();
// 获取服务器的绝对路径{例如:D:workspace.metadata.pluginsorg.eclipse.wst.server.core	mp0wtpwebapps
ice}
String realPath = getRequest().getRealPath("");
原文地址:https://www.cnblogs.com/mjtabu/p/11942704.html