hibernate.cfg.xml of Hibernate

前端 未结 2 445
旧巷少年郎
旧巷少年郎 2021-01-27 09:23

In my Java Project, hibernate.cfg.xml is sitting in the source folder-- \\src. So, to be precise, it is a file in the source folder, sitting right next to the

2条回答
  •  太阳男子
    2021-01-27 10:14

    Exact same code-- both the calling class and DTOs worked in another project i set up from scratch. The setup & placement of libraries and the codes are the same, so are the other environment setting (all default Eclipse).

    The only difference is the DBs behind and the related config file settings. I used postgreSQL in the former one and set the related tags in config according to that. The DB in the second, the one that worked is MySQL. Outside of these related tags, the hibernate.cfg.xml file is the same in the two projects-- the exact same set of tags, and values of non-postgreSQL/non-MySQL properties.

    From what I know, Configure is a class reading & processing on the config file. and since everything else is the exact same, must be a mistake in postgreSQL setting in the former project.

提交回复
热议问题