使用ecplise进行hibernate环境配置
跟着老师视频操作 第一步准备相关材料 添加jar包
继续导入xml文件
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="foo">
<property name="show_sql">true</property>
<mapping resource="org/hibernate/test/legacy/Simple.hbm.xml"/>
<class-cache
class="org.hibernate.test.legacy.Simple"
region="Simple"
usage="read-write"/>
</session-factory>
</hibernate-configuration>
在show view 中没发现有Data Development 进行相关搜索
发现可以运用Data Source Explorer
发现数据库版本不对应 于是查看数据库版本 在官方网站中寻找相关jar包
寻找mysql 版本相关的 connector-java
找到相关下载
下载完毕,然后进行相关导入。
创建相关数据库表
进行信息输入
表格如下