public static Object getDao(HttpServletRequest request,String name){
Object ad= (Object) WebApplicationContextUtils.getRequiredWebApplicationContext(request.getSession().getServletContext()).getBean(name);
return ad;
}看名字,就是返回一个name指定的Dao对象
public synchronized static String getID() {
Random random = new Random();
StringBuffer ret = new StringBuffer(20);
String rand = String.valueOf(Math.abs(random.nextInt()));
ret.append(getDateStr()); 应该是当前日期
ret.append(rand.substring(0,6)); 随机数,只要前6位。
return ret.toString();
}