【发布时间】:2015-10-27 20:26:34
【问题描述】:
一个 Hibernate 核心应用程序在类路径目录中有以下文件,其中包含以下条目:
在hibernate.properties中:
hibernate.connection.url = jdbc:mysql://localhost/myAppDB1
在 hibernate.cfg.xml 文件中我们有:
<property name="hibernate.connection.url">
jdbc:mysql://localhost/myAppDB2
</property>
鉴于文件在文件中的正确位置有上述语句,当hibernate被初始化时,Hibernate将连接到哪个数据库?
a)myAppDB1/b)myAppDB2/c)无法决定/d)错误
【问题讨论】:
标签: hibernate