67,512
社区成员
发帖
与我相关
我的任务
分享
<hibernate-configuration>
<session-factory>
<mapping resource="xxx.hbm.xml" />
<mapping resource="yyy.hbm.xml" />
</session-factory>
</hibernate-configuration>
configuration.configure("hibernate.cfg.xml");
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.SQLServerDialect");
configuration.setProperty("hibernate.connection.url", "jdbc:sqlserver://localhost:1433; DatabaseName=test");
configuration.setProperty("hibernate.connection.username", "sa");
......
sessionFactory = configuration.buildSessionFactory();