为什么在hibernate中factory = new Configuration().configure().buildSessionFactory();会这么慢
有没有解决方法没有?
代码如下:
factory = new Configuration().configure().buildSessionFactory();
配置文件如下:
<hibernate-configuration>
<session-factory name="foo">
<mapping resource="struts/advinfo/db/Advisor.hbm.xml"/>
<mapping resource="sys/bm/Duty.hbm.xml"/>
<mapping resource="struts/message/bo/Accessories.hbm.xml"/>
<mapping resource="struts/message/bo/Body.hbm.xml"/>
<mapping resource="struts/message/bo/Send.hbm.xml"/>
</session-factory>
</hibernate-configuration>