hibernate.cfg.xml 多谢啊 最好有注释啊
解决方案 »
- JSP应该怎么学?
- struts 不跳转
- 如何防止用户申请到同一个帐号问题!
- jspSmartUpload组件上传时报错!!急急急
- 用GOOGLE或百度怎么都搜不到tomcat的下载地址?
- jsp页面里写<%request.setAttribute("aa",request.getAttribute("aa"));%>可以吗?
- 关于applet与html的表单通迅问题
- 从ORACLE数据库中读取的数据变成了0xEFBC9FEFBC9FEFBC9FEFBC这种问题怎么解决(我的jsp页面采用utf-8编码)
- jsp中import class
- 极其简单的问题,jsp中我想转到另一个页面,怎么写??
- Ajax向服务器发送请求的步骤
- ext调用struts2,如何将查询到的数据返回到页面用ext显示出来。
<!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">sa</property>//数据库用户名
<property name="connection.url">jdbc:sqlserver://192.168.1.105:1433;databaseName=test</property>//url
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>sql数据库方言
<property name="myeclipse.connection.profile">conn</property>//链接源名称
<property name="connection.password">uoon</property>//数据库密码
<property name="connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>>//驱动类
</session-factory></hibernate-configuration>
<!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">sa</property> //用户名
<property name="connection.url"> //URL
jdbc:sqlserver://localhost:1433;databasename=ReportServerTempDB
</property>
<property name="dialect">
org.hibernate.dialect.SQLServerDialect //数据库方言
</property>
<property name="myeclipse.connection.profile">sql server</property>
<property name="connection.password">123456</property> //密码
<property name="connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="show_sql">true</property>
<property name="hbm2ddl.auto">create</property> //使用注解生成数据库表
<mapping resource="com/ssha/hibernate/entity/Users.hbm.xml" /> //实体印射
<mapping resource="com/ssha/hibernate/entity/Department.hbm.xml" />
<mapping resource="com/ssha/hibernate/entity/Employee.hbm.xml" /></session-factory></hibernate-configuration>