Hibernate 中 Unable to execute schema management to JDBC target异常

众所周知,Hibernate可以自动创建表,但要注意在hibernate.cfg.xml中要这样设置:

①当表还没创建即第一次运行前:

<property name="hibernate.hbm2ddl.auto">create</property>

②当表创建以后要进行表的增删改查的操作前:

<property name="hibernate.hbm2ddl.auto">update</property>

 

posted @ 2022-12-11 12:03  威哥哥哥  阅读(24)  评论(0)    收藏  举报