筆記一下:
設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