我做了4个文件:
1.UserDetail.java
2.UserDTO1.java
3.hibernate.cfg.xml
4.UserDTO1.hbm.xml
在UserDetail.java中,我使SessionFactory的实作类对象:
Session Factory factory=new Configuration().configure().buildSessionFactory();现在,控件转到hibernate (但我想知道是先建立连接还是先执行映射resource="UserDTO1.hbm.xml“)。
然后在UserDTO1.hbm.xml中,控件将如何进入DTO文件。什么时候,
<property name="hbm2ddl.auto">create</property> 在配置文件中将被执行。
我想知道执行的流程,,所有这些事情是怎么发生的。
发布于 2018-01-20 08:51:32
在cnf.xml中,它首先建立一个连接,然后控件转到hbm.xml。
https://stackoverflow.com/questions/48239337
复制相似问题