我在question之后提出的问题。变得封锁, 我试图将ojdbc14的版本更改为ojdbc6。
我想在日志中显示DBMS
的版本,
我应该向JpaProperties
添加哪些属性会显示DBMS
答案 0 :(得分:1)
Hibernate应打印出日志文件中使用的方言。我将根记录器设置为INFO,以便打印出以下内容。
我想如果你设置log4j.logger.org.hibernate=INFO
它应该有效。
在服务器日志中查看以下行:
HHH000412: Hibernate Core {4.2.8.Final} 04:33:28:0.472
HHH000206: hibernate.properties not found 04:33:28:0.475
HHH000021: Bytecode provider name : javassist 04:33:28:0.477
//The line below will tell you what dialect Hibernate is using to connect
//to your database. From there you should be able to work out what kind of
//database it is
HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 04:33:29:0.320
HHH000399: Using default transaction strategy (direct JDBC transactions) 04:33:29:0.547
HHH000397: Using ASTQueryTranslatorFactory 04:33:29:0.557
HV000001: Hibernate Validator 4.3.1.Final 04:33:29:0.632
HHH000229: Running schema validator 04:33:30:0.171
HHH000102: Fetching database metadata 04:33:30:0.171