Hibernate自动导入sql

Adding import.sql to the class path works great, hbm2ddl checks if the file exists and executes it. The only additional detail is that each sql command must be on its own line, otherwise it will fail to execute.

 

Hibernate 可以自动导入sql脚本,在classpath下创建import.sql文件,每行只能写一条sql语句,否则不能执行。

你可能感兴趣的:(sql,Hibernate)