类型serviceregistrybuilder是过时的
类型serviceregistrybuilder是过时的 ,改成用StandardServiceRegistryBuilder注册对象要用的jar包是哪个,有谁知道吗
类型serviceregistrybuilder是过时的 ,改成用StandardServiceRegistryBuilder注册对象要用的jar包是哪个,有谁知道吗
2016-04-23
StandardServiceRegistry standardRegistry = new StandardServiceRegistryBuilder().configure().build(); Metadata metadata = new MetadataSources(standardRegistry).getMetadataBuilder().applyImplicitNamingStrategy(ImplicitNamingStrategyJpaCompliantImpl.INSTANCE).build();<br> sessionFactory = metadata.getSessionFactoryBuilder().build(); session = sessionFactory.openSession(); transaction = session.beginTransaction();
你应该用的是hibernate4 所以应该这样注册
举报