4.加载hibernate配置文件的2种方式
1.configuration.configure()
要求1、该配置文件必须放在classpath下2、名称必须为hibernate.cfg.xml
2.configuration.configure(“/cn/itcast/config/hibernate.cfg.xml”)
自定义配置文件的名称和路径
转载于:https://blog.51cto.com/pengya123/1794465
1.configuration.configure()
要求1、该配置文件必须放在classpath下2、名称必须为hibernate.cfg.xml
2.configuration.configure(“/cn/itcast/config/hibernate.cfg.xml”)
自定义配置文件的名称和路径
转载于:https://blog.51cto.com/pengya123/1794465