Hibernate 可以配置两种数据库访问策略
1. 指定 JDBC 参数进行数据库连接
2. 通过 JNDI 完成数据库连接获取
JDBC 连接配置
hibernate.dialect net.sf.hiberante.dialect.MysqlDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql://localhost/sample
hibernate.connection.username r ...
hibernate 基础语义
Configuration
Configuration config = new Configuration().configure();
Hibernate 在ClassPath 中搜寻 hiberante.cfg.xml 文件并将其加载到内存中。
File file = new File("C:\\myhibernate.xml");
Configuration config = new Configuration().configure(file);
SessionFactory 负责建立 session. 通过 configur ...
Hibernate 映射类型与Java 类型对照
映射类型 java 类型 标准 sql 类型
integer int or Integer INTEGER
long long or java.lang.Long BIGINT
short short or java.lang.Short SMALLINT
float float or java.lang.Float FLOAT
double ...
- 浏览: 25675 次
- 性别:

- 来自: 地球

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
java 输入/输出流小记 ( ...
[size=xx-small][/size]
-- by yuzhisheng -
roller4.0 安装小记
怎么报roller 4 放到Eclipse 中 谢谢
-- by chengqianl -
roller4.0 安装小记
引用在\tomcat-5.5.17\conf\Catalina\localhos ...
-- by wang_godsun -
roller4.0 安装小记
“启动tomcat ,就可以正常安装roller 了” 这句什么意思,到这里不 ...
-- by zjxux -
ICE Faces 开发手册翻译 ( ...
icefaces开发中jspx页面中文怎么显示和定义阿?
-- by nbaertuo






评论排行榜