解决方案 »

  1.   

    首先配置<property name="hibernate.hbm2ddl.auto">create</property>
    自己写一个main或者其他测试类 加入如下代码。ok
    Configuration conf=new Configuration();
      conf.configure("/hibernate.cfg.xml");
      SchemaExport dbExport=new SchemaExport(conf);
      dbExport.create(true, true);
      

  2.   

    如果我没理解错,你是要用hibernate映射动态表名吗?这个不难继承DefaultNamingStrategy实现classToTableName