笔记一下:
设hibernate.hbm2ddl.auto为update/create-drop/create后,在classpath中扔一个/import.sql进去,hibernate启动时就会执行import.sql的内容。
11860 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export
11860 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaExport - import file not found: /import.sql
11875 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database