Hibernate4 annotation实例补充try {configuration.configure(/db/hb.cfg.xml)} catch (HibernateExcep
Hibernate4 annotation实例补充
try {configuration.configure("/db/hb.cfg.xml");} catch (HibernateException e) {// TODO Auto-generated catch blocke.printStackTrace();}
?
另一方法是使用main方法测试,个人感觉不好,不够专业,junit是专门的单元测试