博客
关于我
Eclipse下创建Hibernate工程
阅读量:102 次
发布时间:2019-02-26

本文共 816 字,大约阅读时间需要 2 分钟。

一、给 Eclipse 安装 Hibernate 工具

点击 Help--> Install New Software...

点击右上角的 add,输入 Name(可自定义),Location 填入【http://download.jboss.org/jbosstools/neon/stable/updates/】

选择 Jboss Web and Java EE Development 目录下的 Hibernate Tools

安装完成后,重启 Eclipse

点击左上角 New,选择 Other,找到 Hibernate,说明安装成功

二、下载必须的 jar 包

  • hibernate-release-5.2.10.Final/lib/required下的所有包(共8个)
  • mysql-connector-java-5.1.41-bin.jar
  • junit-4.10.jar

三、给 Eclipse 添加自定义类库

点击 Windows--> Preference-->Java-->Build Path-->User Libraries

点击 New,输入名字如 hibernate-core

选择 Add External JARs,导入 hibernate 核心包

点击 New,输入名字如 junit4

选择 Add External JARs,导入 junit4.0 jar

点击 New,输入名字如 mysql-jdbc

选择 Add External JARs,导入 mysql jdbc 驱动包

四、新建 Java Project,导入类库

新建 Java project,命名为 Hibernate_001

右键选择 Properties-->Java Build Path-->Libraries

点击 Add Libraries,选择 User Libraries

全选并添加刚创建的自定义库

文章完毕

转载地址:http://rpuu.baihongyu.com/

你可能感兴趣的文章
ThreadLocal线程内部存储类
查看>>
thinkphp 常用SQL执行语句总结
查看>>
Oracle:ORA-00911: 无效字符
查看>>
Text-to-Image with Diffusion models的巅峰之作:深入解读 DALL·E 2
查看>>
TCP基本入门-简单认识一下什么是TCP
查看>>
tableviewcell 中使用autolayout自适应高度
查看>>
Orcale表被锁
查看>>
svn访问报错500
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
查看>>
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
查看>>
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
查看>>
org.tinygroup.serviceprocessor-服务处理器
查看>>
org/eclipse/jetty/server/Connector : Unsupported major.minor version 52.0
查看>>