将hibernate.cfg.xml中 <session-factory name="SessionFactory">的那么属性去掉即可
因为有了name属性hibernate会试图把这个sessionfacotry注册到jndi中去
本文详细介绍了如何在hibernate.cfg.xml配置文件中删除名为SessionFactory的属性设置,以避免Hibernate尝试将其注册到JNDI环境中。
将hibernate.cfg.xml中 <session-factory name="SessionFactory">的那么属性去掉即可
因为有了name属性hibernate会试图把这个sessionfacotry注册到jndi中去
43