我的问题在于把hibernate.cfg.xml文件放置在某个包中了,hibernate.cfg.xml文件需要放置在src目录下。 转载于:https://www.cnblogs.com/liaoxiaolao/p/9916272.html