日期:2014-05-18  浏览次数:20798 次

急求hibernate例子代码
本人配置了很多天hibernate,没有成功,现在很烦,想求一个已经成功的例子.

------解决方案--------------------
你想要什么样的例子!说清楚!
------解决方案--------------------
详细地给你写代码不是很现实,帮你找了个学习链接,可以参考以下,不过要想学好hibernate,对于其底层的了解是至关重要的,仅供参考!

http://free.21cn.com/newbbs/mainframe.jsp?url=/forum/bbsMessageList.act?bbsThreadId=1568464
------解决方案--------------------
哥们 有没有邮箱啊!发个简单的录像例子给你!入门差不多吧
------解决方案--------------------
用Eclipse+Myeclipse,很容易配。

------解决方案--------------------
自己看hibernate的doc目录下有quick start
------解决方案--------------------
<?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 ">

<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>

<session-factory>
<property name= "connection.username "> classiccars </property>
<property name= "connection.url ">
jdbc:derby://localhost:1527/myeclipse;create=true
</property>
<property name= "dialect ">
org.hibernate.dialect.DerbyDialect
</property>
<property name= "myeclipse.connection.profile ">
MyEclipse Derby
</property>
<property name= "connection.password "> myeclipse </property>
<property name= "connection.driver_class ">
org.apache.derby.jdbc.ClientDriver
</property>
<!-- 这里在配置一下entiy.hbm.xml的路径就可以了 --!>

</session-factory>

</hibernate-configuration>