http://blog.csdn.net/fdgaq/archive/2010/05/03/5552561.aspx

第一种方式使用hiberante.cfg.xml:
hiberante.cfg.xml配置如下:

applicationContext-hibernate.xml

第二种方式,不要hiberante.cft.xml,直接在applicationContext-hibernate.xml中配置: