筆記一下:
設(shè)hibernate.hbm2ddl.auto為update/create-drop/create后,在classpath中扔一個(gè)/import.sql進(jìn)去,hibernate啟動(dòng)時(shí)就會(huì)執(zhí)行import.sql的內(nèi)容。
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