这边怎么报错了
SchemaExport export = new SchemaExport(config);
我在SchemaExport这两个地方怎么出现波浪线报错?
SchemaExport export = new SchemaExport(config);
我在SchemaExport这两个地方怎么出现波浪线报错?
2015-10-23
import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; import org.hibernate.service.ServiceRegistryBuilder; import org.junit.Test; public class TestStudents { @Test public void testSchemaExport(){ //创建配置对象 Configuration config=new Configuration().configure(); //创建服务注册对象 ServiceRegistry serviceRegistry=new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry(); //创建SessionFactory SessionFactory sessionFactory=config.buildSessionFactory(serviceRegistry); //创建session对象 Session session=sessionFactory.getCurrentSession(); //创建SchemaExport对象 SchemaExport export = new SchemaExport(config); } }
举报