前段时间把网上提供的于hibernate+acegi的基础i改成ibatis+acegi,共享给大家
数据库表
create table USER_INFO(
id int not null auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
username varchar(50) not null,
truename varchar(50) not null,
email varchar(50) not null,
nation int not null default 0,
birthday date not null,
sex int not null default 0,
idcard varchar(18) not null check (idcard.lan in (16,18)),
tel1 varchar(15),
tel2 varchar(15),
address varchar(150),
password varchar(50) not null,
auth_flag int not null default 0,
PRIMARY KEY (id),
UNIQUE KEY (username)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table USER_LOGIN(
id int not null auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
uid int not null,
ip varchar(16) not null,
mac varchar(20) not null,
PRIMARY KEY (id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table USER_SECURITY(
id int not null auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
ip_flag int not null,
ip varchar(15),
mac_flag int not null default 0,
mac varchar(15),
uid int not null,
PRIMARY KEY (id),
UNIQUE KEY (uid)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE ROLE(
id int not null auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
role_name varchar(50) not null,
role_desc varchar(50),
roleState int(11) NOT NULL default 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE AUTHTYPE (
id int(11) NOT NULL auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
typeName varchar(20) NOT NULL,
typeState int(11) NOT NULL default 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE AUTHORITIES (
id int(11) NOT NULL auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
authProtected varchar(100) NOT NULL,
authNote varchar(200) default NULL,
authType int(2) NOT NULL,
authState int(1) NOT NULL,
PRIMARY KEY (id),
KEY FK_authorities (authType),
CONSTRAINT authorities_ibfk_1 FOREIGN KEY (authType) REFERENCES authtype (id) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE ROLE_AUTH (
id int(11) NOT NULL auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
rid int(11) NOT NULL,
aid int(11) NOT NULL,
PRIMARY KEY (id),
KEY FK_role_auth (rid),
KEY FK_auth_role (aid),
CONSTRAINT role_auth_ibfk_1 FOREIGN KEY (rid) REFERENCES role (id) ON UPDATE CASCADE,
CONSTRAINT role_auth_ibfk_2 FOREIGN KEY (aid) REFERENCES authorities (id) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE USER_ROLE (
id int(11) NOT NULL auto_increment,
active_flag int not null default 0,
last_update_date timestamp,
create_date datetime not null,
uid int(11) NOT NULL,
rid int(11) NOT NULL,
PRIMARY KEY (id),
KEY FK_user_role (uid),
KEY FK_role_users (rid),
CONSTRAINT user_role_ibfk_1 FOREIGN KEY (uid) REFERENCES USER_INFO (id) ON UPDATE CASCADE,
CONSTRAINT user_role_ibfk_2 FOREIGN KEY (rid) REFERENCES role (id) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
src在上传的包里
分享到:
相关推荐
struts1.2+batis+spring2.0+oracle集成例子自己刚学的,写得不太好请大家理解!
一个挺实用spring mvc+my batis+dwz的示例
struts1.2+batis+spring2.0+oracle集成例子自己刚学的比原来那个例子增加分页功能,我QQ是434342407希望和大家交个朋友,如果写得不好请大家理解!
里面是搭建好的mybatis + maven + Spring4 的架构, 并提供了一个样例接口
springboot整合ssm项目+batis+打包docker到服务器上面。
spring MVC spring my batis SSM框架工程 商城购物平台
在Eclipse下做的一个MyBatis的例子,对配置文件进行了注释,可供有兴趣了解的朋友参考
BATIS 2.0 开发指南 V1.0 作者:夏昕 xiaxin(at)gmail.com
batis 配置文件
batis代码,带有web项目,不需要导入数据库即可运行
基于深度学习并实战 spring boot 的项目合集(已集成batis-aop(AOP自定义多数据源)、multi-datasource-mybatis(使用Mybatis集成多数据源)、quartz(定时任务)等).zip基于深度学习并实战 spring boot 的项目合集(已...
mysql的驱动包 mybatis的官方包和源码包+官方文档 使用mybatis所有基本包
【资源说明】 1、该资源包括项目的全部源码,...基于深度学习并实战 spring boot 的项目,成功集成batis-aop(AOP自定义多数据源)、multi-datasource-mybatis(使用Mybatis集成多数据源)、quartz(定时任务)、rabbit.zip
酒店管理系统基于Java Web进行开发,运用ecilpse开发环境、Java编程语言、MySQL数据库技术,实现酒店的信息管理功能。需要的可下载,调试对应的代码。适合人群:具备一定的编程能力,大学生适用。
SpringMVC + Spring + Mybatis的框架实例,对于新接触的开发者非常有用,可以比较系统的了解各个环节,包括配置本身
mybatis调用orclae存储过程
m1y1batis_plus1_2.816_crack_v2.86_213123131release.zip
mybatis两个重要的dtd文件 batis-3-config.dtd; mybatis-3-mapper.dtd
映射另一种技术跟hibernate稍有不同