今天在使用注解学习hibernate时,发现无论怎么样都无法建立新表,后来才发现是在配置文件中少加了一句话 <property name="hibernate.hbm2ddl.auto">update</property> 加上就可以了。