博客
关于我
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/

你可能感兴趣的文章
org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not s
查看>>
sqlserver学习笔记(三)—— 为数据库添加新的用户
查看>>
org.apache.http.conn.HttpHostConnectException: Connection to refused
查看>>
org.apache.ibatis.binding.BindingException: Invalid bound statement错误一例
查看>>
org.apache.ibatis.exceptions.PersistenceException:
查看>>
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.boot:spring boot maven plugin丢失---SpringCloud Alibaba_若依微服务框架改造_--工作笔记012
查看>>
SQL-CLR 类型映射 (LINQ to SQL)
查看>>
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
查看>>
org/hibernate/validator/internal/engine
查看>>