81,122
社区成员




HibernateDAO<T> extends HibernateDaoSupport implements DAO<T>{
//里面实现接口的CRUD及其他方法
}
public class ACLService extends AbstractHibernateDAO<ACL>{
//继承的一个子类
public String sayHello(){
return "hello";
}
}
public static void main(String args[]) throws Exception{
String[] loc = {"spring/applicationContext_transaction.xml","spring/applicationContext_model.xml"};
ApplicationContext ctx = new ClassPathXmlApplicationContext(loc);
ACLService acl = (ACLService)ctx.getBean("ACLService");
System.out.println(acl.sayHello());
}