当前位置:首页>开发>正文

如何查看hibernate版本 如何查看Hibernate的版本

2023-04-19 21:06:50 互联网 未知 开发

 如何查看hibernate版本 如何查看Hibernate的版本

如何查看hibernate版本

查看Hibernate的版本,首先要找到Hibernate的jar包,然后右击,以压缩文件打开,找到META-INF文件夹,打开这个文件夹找到MANIFEST.MF文件,打开里面就有Hibernate的版本信息了!

如何查看Hibernate的版本

方法一:解压方式打开jar包、双击META-INF文件夹打开:MANIFEST.MF文件
Hibernate-Version:后面就是版本号!
方法二:参照引入的jar里面的dtd写:
双击jar解压工具打开文件、进入如下目录:orghibernate
在里面有两个dtd、一个:hibernate-configuration-版本号.dtd、一个:hibernate-mapping-版本号.dtd
configuration就是hibernate.cfg.xml的dtd而mapping就是hbm.xml的dtd

在myeclipse里如何查看spring, hibernate的版本

看jar包里的信息

1、Spring的版本信息
查看 Spring.jarMETA-INFMANIFEST.MF,文件内容如下:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.Created-By: 1.5.0_12-b04 (Sun Microsystems Inc.)
Implementation-Title: Spring Framework
Implementation-Version: 2.0.Spring-Version: 2.0.Premain-Class: org.springframework.instrument.InstrumentationSavingAgent通过Spring-Version来确定Spring的版本是2.0
2、hibernate3的版本信息
查看 hibernate3.jarMETA-INFMANIFEST.MF,文件内容如下:

Manifest-Version: 1.0
Created-By: 1.4.2_11-b06 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.6.Implementation-Title: HibernateHibernate-Version: 3.2.3.ga
Implementation-Version: 3.2.3.ga
Implementation-Vendor: hibernate.org通过Hibernate-Version来确定Hibernate的版本是3.

3、struts的版本信息
查看 struts.jarMETA-INFMANIFEST.MF,再查看 Implementation-Version
看后面的数字,文件内容如下:
Manifest-Version: 1.0
Specification-Title: Struts Framework
Class-Path:  commons-beanutils.jar commons-collections.jar commons-dig
 ester.jar commons-fileupload.jar commons-logging.jar commons-validato
 r.jar jakarta-oro.jar
Created-By: 1.3.1_04-b02 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.6.Implementation-Title: Struts Framework
Specification-Version: 1.2.Specification-Vendor: The Apache Software Foundation
Implementation-Vendor-Id: org.apache
Extension-Name: Struts Framework
Implementation-Version: 1.2.Implementation-Vendor: The Apache Software Foundation通过Implementation-Version来确定Struts的版本信息

关于Hibernate的三种查询方式。

hql提供了更接近于传统SQL语句的查询语法,容易过度吧,官方推荐使用,它提供强大的查询功能。一般使用这种查询。
Criteria查询,可移植性好,用起来也很方便,当你的查询条件很多时,可用Example创建一查询依据,查出属性与之类似的对象,代码简洁运用很方便。
Native SQL一般在遇到很复杂的查询条件时使用。
说白了,灵活运用就行,在不同情况下使用不同的解决方案,建议你多看些实例,见得多了用起来就比较容易判断该用哪一个。
如果问题解决,请点赞采纳,谢谢!!!

最新文章