摘要:
网上的教程很多,参考了一些,自己再总结一下。版本:Struts2.2.3 Spring3.0 Hibernate3.3myeclipse8.6整合步骤如下:1、新建web工程2、添加spring3、添加hibernate4、添加struts25、配置文件新建web工程添加spring添加hibernate注:之前可以先添加dataSource 具体步骤:Window->Open Perspective->MyEclipse Database Explorer切换到Database Explorer视图对表进行Hibernate反向转换添加struts2向/WEB-INF/lib添加 阅读全文
摘要:
1、自动增长identity适用于MySQL、DB2、MS SQL Server,采用数据库生成的主键,用于为long、short、int类型生成唯一标识使用SQL Server 和 MySQL 的自增字段,这个方法不能放到 Oracle 中,Oracle 不支持自增字段,要设定sequence(MySQL 和 SQL Server 中很常用)数据库中的语法如下:MySQL:create table t_user(id int auto_increment primary key, name varchar(20));SQL Server:create table t_user(id int 阅读全文