原创


链接:https://pan.baidu.com/s/1S-x271CT3wBqQodfFI1dZg 密码:ghti

hiberdate3的下载链接如上

hibernate3在MyEclipse2014中的配置

第一步:

将有关包导入项目的lib目录下,基本包如下,在lib目录下

配置hibernate.cfg.xml文件(我用的是SQL,此文件放在src下)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="connection.url">jdbc:sqlserver://localhost:1433; DatabaseName=DB OF CWM</property>
<property name="connection.username">sa</property>
<property name="connection.password">******</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="show_sql">true</property>
<mapping resource="hibernate/Student.hbm.xml" />
</session-factory>
</hibernate-configuration>

配置****.hbm.xml(此文件要和PO放在同一个包下)

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="hibernate">
<class name="hibernate.Student" table="Student">
<id name="sno" column="sno">
<generator class="assigned"/>
</id>
<property name="sname"/>
<property name="ssex"/>
<property name="sage"/>
<property name="sdept"/>
</class>
</hibernate-mapping>

20:46:15

2018-11-17

hibernate3的配置的更多相关文章

  1. Hibernate3.0配置

    我的系统Win10(64x),Eclipse jee 2018-09 ,Sql2018版本. 以下是Hibernate3.0配置包 链接:https://pan.baidu.com/s/10Kizby ...

  2. Hibernate3 和Hibernate4 在配置文件上的区别

    在使用hibernate之前要首先对hibernate进行一些基础的配置信息,像映射文件XXX.hbm.xml  XXX代表当前的domain的模型类名 <?xml version=" ...

  3. Spring 事务配置的几种方式

    参考:http://www.blogjava.net/robbie/archive/2009/04/05/264003.html http://www.cnblogs.com/appleat/arch ...

  4. applicationContext.xml 配置

    Hibernate SQL方言 (hibernate.dialect) 数据库 hibernate方言 DB2 org.hibernate.dialect.DB2Dialect DB2 AS/400 ...

  5. spring与hibernate整合配置基于Annotation注解方式管理实务

    1.配置数据源 数据库连接基本信息存放到properties文件中,因此先加载properties文件 <!-- jdbc连接信息 --> <context:property-pla ...

  6. [转载]一个标准java程序员的进阶过程

    第一阶段:Java程序员 技术名称 内                 容 说明 Java语法基础 基本语法.数组.类.继承.多态.抽象类.接口.object对象.常用类(Math\Arrarys\S ...

  7. Hibernate SQL方言 (hibernate.dialect) Spring配置文件applicationContext.xml

    转自:http://www.cnblogs.com/wj-wangjun/archive/2009/10/21/1587624.html Hibernate SQL方言 (hibernate.dial ...

  8. 第一个structs+spring+hibernate的web程序

    1. 数据库: Column Type Comment id int(11) Auto Increment   name varchar(50) NULL   url varchar(255) NUL ...

  9. Spring发展历程总结

    目前很多公司的架构,从Struts2迁移到了SpringMVC.你有想过为什么不使用Servlet+JSP来构建Java web项目,而是采用SpringMVC呢? 既然这样,我们从源头说起.Stru ...

随机推荐

  1. Julia - 数学运算

    算术运算符 算术运算符适用于所有的基本数值类型 +x,一元加法,就是 x 本身 -x,一元减法,x 的相反数 x + y,二元加法,做加法运算 x - y,二元减法,做减法运算 x * y,乘法,做乘 ...

  2. 转 maven jetty 插件

    maven jetty 插件使用 本机环境 JDK 7 Maven 3.2 Jetty 9.2 Eclipse Luna pom.xml 配置 在你的 pom.xml 文件中添加 jetty 插件的描 ...

  3. [z]单次遍历带权随机选取

    http://www.gocalf.com/blog/weighted-random-selection.html 没事可以看看,这个博客里面很多文章不错

  4. C#接口的三种实现方式

    转自原文C#接口的三种实现方式 public interface MyInterface { /// 下面三个方法的签名都是 /// .method public hidebysig newslot ...

  5. SqlServer 获得存储过程的返回值(参数返回),别玩了output

    declare @dingdanid int declare @fanhuizhi int set @dingdanid = 1 exec 检测订单出库资格 @dingdanid ,@fanhuizh ...

  6. leetcode836

    public class Solution { public bool IsRectangleOverlap(int[] rec1, int[] rec2) { ], rec2[]) < Mat ...

  7. GNU Bash Shell 编程图解笔记

    bash,Unix shell的一种,在1987年由布莱恩·福克斯为了GNU计划而编写.1989年发布第一个正式版本,原先是计划用在GNU操作系统上,但能运行于大多数类Unix系统的操作系统之上,包括 ...

  8. 跟着太白老师学python day10 函数嵌套, global , nonlocal

    函数嵌套: 第一种嵌套方法 def func(): count = 123 def inner(): print(count) inner() func() 第二种嵌套方法 count = 123 d ...

  9. 【原】Coursera—Andrew Ng机器学习—课程笔记 Lecture 14—Dimensionality Reduction 降维

    Lecture 14 Dimensionality Reduction 降维 14.1 降维的动机一:数据压缩 Data Compression 现在讨论第二种无监督学习问题:降维. 降维的一个作用是 ...

  10. bootstrap-select.js 下拉框多选后动态赋值

    话不多说先上demo 其实demo是从官网下载的 只稍作改动 由于没有搞清楚怎么上传源代码 就把官网的链接贴出来吧 https://github.com/silviomoreto/bootstrap- ...