new Configuration()
默认使用的是hibernate.properties
因为你没有 所以这时log会打出10:22:55,713 INFO Environment:491 - hibernate.properties not found
这时你要使用了hibernate.cfg.xml只要这样些就可以了
new Configuration().configure()就可以加载进来了!
默认使用的是hibernate.properties
因为你没有 所以这时log会打出10:22:55,713 INFO Environment:491 - hibernate.properties not found
这时你要使用了hibernate.cfg.xml只要这样些就可以了
new Configuration().configure()就可以加载进来了!
本文介绍了Hibernate在找不到hibernate.properties文件时的行为,并解释了如何通过使用hibernate.cfg.xml来配置Hibernate。
424

被折叠的 条评论
为什么被折叠?



