????3?????
public static void main(String[] args) throws Exception
{
//?????Configuration?????д?????????hibernate.cfg.xml???
Configuration conf = new Configuration().configure();
//??Configuration????SessionFactory
SessionFactory sf = conf.buildSessionFactory();
//      //????SchemaExport????
SchemaExport se = new SchemaExport(conf);
//      //???????????????SQL???
se.setFormat(true);
//          //???????SQL??????????
se.setOutputFile("d:\1.sql");
//      //???SQL??????????SQL???
se.create(true?? true);
sf.close();
}
??????????????