发布于 2018-03-15 08:27:32 | 86 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Spring Framework 开源j2ee框架

Spring是什么呢?首先它是一个开源的项目,而且目前非常活跃;它是一个基于IOC和AOP的构架多层j2ee系统的框架,但它不强迫你必须在每一层 中必须使用Spring,因为它模块化的很好,允许你根据自己的需要选择使用它的某一个模块;它实现了很优雅的MVC,对不同的数据访问技术提供了统一的接口,采用IOC使得可以很容易的实现bean的装配,提供了简洁的AOP并据此实现Transcation Managment,等等


这篇文章主要介绍了spring security数据库表结构实例代码,需要的朋友可以参考下

PD建模图

建模语句


alter table SYS_AUTHORITIES_RESOURCES 
  drop constraint FK_SYS_AUTH_REFERENCE_SYS_AUTH; 
alter table SYS_AUTHORITIES_RESOURCES 
  drop constraint FK_SYS_AUTH_REFERENCE_SYS_RESO; 
alter table SYS_RESOURCES 
  drop constraint FK_SYS_RESO_REFERENCE_SYS_MODU; 
alter table SYS_ROLES_AUTHORITIES 
  drop constraint FK_SYS_ROLE_REFERENCE_SYS_ROLE; 
alter table SYS_ROLES_AUTHORITIES 
  drop constraint FK_SYS_ROLE_REFERENCE_SYS_AUTH; 
alter table SYS_ROLES_MOUDLES 
  drop constraint FK_SYS_ROLE_REFERENCE_SYS_MODU; 
alter table SYS_ROLES_MOUDLES 
  drop constraint FK_S_ROLE_REFERENCE_SYS_ROLE; 
alter table SYS_USERS_ROLES 
  drop constraint FK_SYS_USER_REFERENCE_SYS_USER; 
alter table SYS_USERS_ROLES 
  drop constraint FK_SYS_USER_REFERENCE_SYS_ROLE; 
drop table PERSISTENT_LOGINS cascade constraints; 
drop table SYS_AUTHORITIES cascade constraints; 
drop table SYS_AUTHORITIES_RESOURCES cascade constraints; 
drop table SYS_MODULES cascade constraints; 
drop table SYS_RESOURCES cascade constraints; 
drop table SYS_ROLES cascade constraints; 
drop table SYS_ROLES_AUTHORITIES cascade constraints; 
drop table SYS_ROLES_MOUDLES cascade constraints; 
drop table SYS_USERS cascade constraints; 
drop table SYS_USERS_ROLES cascade constraints; 
/*==============================================================*/ 
/* Table: PERSISTENT_LOGINS                   */ 
/*==============================================================*/ 
create table PERSISTENT_LOGINS ( 
  USERNAME       VARCHAR2(64), 
  SERIES        VARCHAR2(64)          not null, 
  TOKEN        VARCHAR2(64), 
  LAST_USED      TIMESTAMP, 
  constraint PK_PERSISTENT_LOGINS primary key (SERIES) 
); 
comment on table PERSISTENT_LOGINS is 
'Spring Remember me 持久化'; 
/*==============================================================*/ 
/* Table: SYS_AUTHORITIES                    */ 
/*==============================================================*/ 
create table SYS_AUTHORITIES ( 
  AUTHORITY_ID     VARCHAR2(100)          not null, 
  AUTHORITY_MARK    VARCHAR2(100), 
  AUTHORITY_NAME    VARCHAR2(100)          not null, 
  AUTHORITY_DESC    VARCHAR2(200), 
  MESSAGE       VARCHAR2(100), 
  ENABLE        NUMBER, 
  ISSYS        NUMBER, 
  MODULE_ID      VARCHAR2(100), 
  constraint PK_SYS_AUTHORITIES primary key (AUTHORITY_ID) 
); 
/*==============================================================*/ 
/* Table: SYS_AUTHORITIES_RESOURCES               */ 
/*==============================================================*/ 
create table SYS_AUTHORITIES_RESOURCES ( 
  ID          VARCHAR2(100)          not null, 
  RESOURCE_ID     VARCHAR2(100)          not null, 
  AUTHORITY_ID     VARCHAR2(100)          not null, 
  constraint PK_SYS_AUTHORITIES_RESOURCES primary key (ID) 
); 
/*==============================================================*/ 
/* Table: SYS_MODULES                      */ 
/*==============================================================*/ 
create table SYS_MODULES ( 
  MODULE_ID      VARCHAR2(100)          not null, 
  MODULE_NAME     VARCHAR2(100)          not null, 
  MODULE_DESC     VARCHAR2(200), 
  MODULE_TYPE     VARCHAR2(100), 
  PARENT        VARCHAR2(100), 
  MODULE_URL      VARCHAR2(100), 
  I_LEVEL       NUMBER, 
  LEAF         NUMBER, 
  APPLICATION     VARCHAR2(100), 
  CONTROLLER      VARCHAR2(100), 
  ENABLE        NUMBER(1), 
  PRIORITY       NUMBER, 
  constraint PK_SYS_MODULES primary key (MODULE_ID) 
); 
comment on column SYS_MODULES.I_LEVEL is 
'1'; 
/*==============================================================*/ 
/* Table: SYS_RESOURCES                     */ 
/*==============================================================*/ 
create table SYS_RESOURCES ( 
  RESOURCE_ID     VARCHAR2(100)          not null, 
  RESOURCE_TYPE    VARCHAR2(100), 
  RESOURCE_NAME    VARCHAR2(100), 
  RESOURCE_DESC    VARCHAR2(200), 
  RESOURCE_PATH    VARCHAR2(200), 
  PRIORITY       VARCHAR2(100), 
  ENABLE        NUMBER, 
  ISSYS        NUMBER, 
  MODULE_ID      VARCHAR2(100), 
  constraint PK_SYS_RESOURCES primary key (RESOURCE_ID) 
); 
comment on column SYS_RESOURCES.RESOURCE_TYPE is 
'URL,METHOD'; 
/*==============================================================*/ 
/* Table: SYS_ROLES                       */ 
/*==============================================================*/ 
create table SYS_ROLES ( 
  ROLE_ID       VARCHAR2(100)          not null, 
  ROLE_NAME      VARCHAR2(100), 
  ROLE_DESC      VARCHAR2(200), 
  ENABLE        NUMBER, 
  ISSYS        NUMBER, 
  MODULE_ID      VARCHAR2(100), 
  constraint PK_SYS_ROLES primary key (ROLE_ID) 
); 
/*==============================================================*/ 
/* Table: SYS_ROLES_AUTHORITIES                 */ 
/*==============================================================*/ 
create table SYS_ROLES_AUTHORITIES ( 
  ID          VARCHAR2(100)          not null, 
  AUTHORITY_ID     VARCHAR2(100)          not null, 
  ROLE_ID       VARCHAR2(100)          not null, 
  constraint PK_SYS_ROLES_AUTHORITIES primary key (ID) 
); 
/*==============================================================*/ 
/* Table: SYS_ROLES_MOUDLES                   */ 
/*==============================================================*/ 
create table SYS_ROLES_MOUDLES ( 
  ID          VARCHAR2(100)          not null, 
  MODULE_ID      VARCHAR2(100)          not null, 
  ROLE_ID       VARCHAR2(100)          not null, 
  constraint PK_SYS_ROLES_MOUDLES primary key (ID) 
); 
comment on table SYS_ROLES_MOUDLES is 
'控制角色对模块的访问权,主要用于生成菜单'; 
/*==============================================================*/ 
/* Table: SYS_USERS                       */ 
/*==============================================================*/ 
create table SYS_USERS ( 
  USER_ID       VARCHAR2(100)          not null, 
  USERNAME       VARCHAR2(100)          not null, 
  NAME         VARCHAR2(100), 
  PASSWORD       VARCHAR2(100)          not null, 
  DT_CREATE      DATE              default SYSDATE, 
  LAST_LOGIN      DATE, 
  DEADLINE       DATE, 
  LOGIN_IP       VARCHAR2(100), 
  V_QZJGID       VARCHAR2(100), 
  V_QZJGMC       VARCHAR2(100), 
  DEP_ID        VARCHAR2(100), 
  DEP_NAME       VARCHAR2(100), 
  ENABLED       NUMBER, 
  ACCOUNT_NON_EXPIRED NUMBER, 
  ACCOUNT_NON_LOCKED  NUMBER, 
  CREDENTIALS_NON_EXPIRED NUMBER, 
  constraint PK_SYS_USERS primary key (USER_ID) 
); 
/*==============================================================*/ 
/* Table: SYS_USERS_ROLES                    */ 
/*==============================================================*/ 
create table SYS_USERS_ROLES ( 
  ID          VARCHAR2(100)          not null, 
  ROLE_ID       VARCHAR2(100)          not null, 
  USER_ID       VARCHAR2(100)          not null, 
  constraint PK_SYS_USERS_ROLES primary key (ID) 
); 
alter table SYS_AUTHORITIES_RESOURCES 
  add constraint FK_SYS_AUTH_REFERENCE_SYS_AUTH foreign key (AUTHORITY_ID) 
   references SYS_AUTHORITIES (AUTHORITY_ID); 
alter table SYS_AUTHORITIES_RESOURCES 
  add constraint FK_SYS_AUTH_REFERENCE_SYS_RESO foreign key (RESOURCE_ID) 
   references SYS_RESOURCES (RESOURCE_ID); 
alter table SYS_RESOURCES 
  add constraint FK_SYS_RESO_REFERENCE_SYS_MODU foreign key (MODULE_ID) 
   references SYS_MODULES (MODULE_ID); 
alter table SYS_ROLES_AUTHORITIES 
  add constraint FK_SYS_ROLE_REFERENCE_SYS_ROLE foreign key (ROLE_ID) 
   references SYS_ROLES (ROLE_ID); 
alter table SYS_ROLES_AUTHORITIES 
  add constraint FK_SYS_ROLE_REFERENCE_SYS_AUTH foreign key (AUTHORITY_ID) 
   references SYS_AUTHORITIES (AUTHORITY_ID); 
alter table SYS_ROLES_MOUDLES 
  add constraint FK_SYS_ROLE_REFERENCE_SYS_MODU foreign key (MODULE_ID) 
   references SYS_MODULES (MODULE_ID); 
alter table SYS_ROLES_MOUDLES 
  add constraint FK_S_ROLE_REFERENCE_SYS_ROLE foreign key (ROLE_ID) 
   references SYS_ROLES (ROLE_ID); 
alter table SYS_USERS_ROLES 
  add constraint FK_SYS_USER_REFERENCE_SYS_USER foreign key (USER_ID) 
   references SYS_USERS (USER_ID); 
alter table SYS_USERS_ROLES 
  add constraint FK_SYS_USER_REFERENCE_SYS_ROLE foreign key (ROLE_ID) 
   references SYS_ROLES (ROLE_ID); 

总结

以上所述是小编给大家介绍的spring security数据库表结构实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对PHPERZ网站的支持!



相关阅读 :
spring security数据库表结构实例代码
Spring学习笔记2之表单数据验证、文件上传实例代码
Spring AOP 基于注解详解及实例代码
Spring组件自动扫描详解及实例代码
EasyUi+Spring Data 实现按条件分页查询的实例代码
EasyUi+Spring Data 实现按条件分页查询的实例代码
EasyUi+Spring Data 实现按条件分页查询的实例代码
Spring Data + Thymeleaf 3 + Bootstrap 4 实现分页器实例代码
[Spring MVC] -简单表单提交实例
简介Java的Spring框架的体系结构以及安装配置
Spring中的事务管理实例详解
Spring实现文件上传(示例代码)
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务