I am developing an application using Spring MVC (version 3.1), Hibernate (version 3.5) and MySQL. In this application, I create a database schema every time the application starts. I want to insert some default data into several tables using the import.sql script file. To do this, I created import.sql script in the root and used the following statements in sleep mode. CFG. xml file.
<property name="hibernate.hbm2ddl.auto">create</property> <property name="hibernate.hbm2ddl.import_files">import.sql</property> <property name="connection.autocommit">true</property>
But I am not getting success to insert default data into tables.
I beg you, please.
source share