权限开发 spring security 3.0.7 序列1 数据库脚本

spring  security  3 细粒度权限控制第一篇,关于权限的初始化测试数据库脚本.


空间脚本:

drop user  FrameworkTest cascade;

drop tablespace FrameworkTest
   including contents and datafiles;

create tablespace FrameworkTest
logging
datafile 'd:/oracle/spaces/framework.dbf'
size 100m
autoextend on 
next 10m maxsize 2048m
extent management local
/

drop tablespace Framework_TMP including contents and datafiles;

create temporary tablespace Framework_TMP 
tempfile 'd:/oracle/spaces/framework_tmp.dbf'
size 100m
autoextend on 
next 10m maxsize 2048m
extent management local
/

create user FrameworkTest identified by FrameworkTest
default tablespace FrameworkTest
temporary tablespace Framework_TMP
/

grant connect,resource to FrameworkTest
/





权限表脚本:

注意:

PERSISTENT_LOGINS
非权限必须,但日志会写到这里,不给框架会报错!


  CREATE TABLE "PERSISTENT_LOGINS" 
   (	
	"USERNAME" VARCHAR2(40 BYTE), 
	"SERIES" VARCHAR2(256 BYTE), 
	"TOKEN" VARCHAR2(256 BYTE), 
	"LAST_USED" VARCHAR2(40 BYTE)
   ) 



create table SYS_AUTHORITIES
 (
   AUTHORITY_ID   VARCHAR2(32) not null,
   AUTHORITY_NAME VARCHAR2(40),
   AUTHORITY_DESC VARCHAR2(100),
   ENABLED        NUMBER(1),
   ISSYS          NUMBER(1),
   MODULE         VARCHAR2(4)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_AUTHORITIES
   is '权限表';
 comment on column SYS_AUTHORITIES.MODULE
   is '所属的子系统,比如平台里面包括10个系统,分别为成本、作业、集输等。';
 alter table SYS_AUTHORITIES
   add constraint PK_PUB_AUTHORITIES primary key (AUTHORITY_ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );



create table SYS_RESOURCES
 (
   RESOURCE_ID     VARCHAR2(32) not null,
   RESOURCE_NAME   VARCHAR2(100),
   RESOURCE_DESC   VARCHAR2(100),
   RESOURCE_TYPE   VARCHAR2(40),
   RESOURCE_STRING VARCHAR2(200),
   PRIORITY        NUMBER(1),
   ENABLED         NUMBER(1),
   ISSYS           NUMBER(1),
   MODULE          VARCHAR2(4)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_RESOURCES
   is '资源表';
 comment on column SYS_RESOURCES.PRIORITY
   is '(暂不用,保留)';
 comment on column SYS_RESOURCES.MODULE
   is '所属的子系统,比如平台里面包括10个系统,分别为成本、作业、集输等。 (暂不用,保留)';
 alter table SYS_RESOURCES
   add constraint PK_PUB_RESOURCES primary key (RESOURCE_ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );



create table SYS_AUTHORITIES_RESOURCES
 (
   ID           NUMBER(13) not null,
   AUTHORITY_ID VARCHAR2(32),
   RESOURCE_ID  VARCHAR2(32),
   ENABLED      NUMBER(1)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_AUTHORITIES_RESOURCES
   is '权限资源表';
 alter table SYS_AUTHORITIES_RESOURCES
   add constraint PK_PUB_AUTHORITIES_RE primary key (ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 alter table SYS_AUTHORITIES_RESOURCES
   add constraint FK_PUB_AUTHORITIES_RE_AU foreign key (AUTHORITY_ID)
   references SYS_AUTHORITIES (AUTHORITY_ID);
 alter table SYS_AUTHORITIES_RESOURCES
   add constraint FK_PUB_AUTHORITIES_RE_RE foreign key (RESOURCE_ID)
   references SYS_RESOURCES (RESOURCE_ID);



create table SYS_ROLES
 (
   ROLE_ID   VARCHAR2(32) not null,
   ROLE_NAME VARCHAR2(40),
   ROLE_DESC VARCHAR2(100),
   ENABLED   NUMBER(1),
   ISSYS     NUMBER(1),
   MODULE    VARCHAR2(4)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_ROLES
   is '角色表';
 comment on column SYS_ROLES.MODULE
   is '所属的子系统,比如平台里面包括10个系统,分别为成本、作业、集输等。';
 alter table SYS_ROLES
   add constraint PK_PUB_ROLES primary key (ROLE_ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );



create table SYS_ROLES_AUTHORITIES
 (
   ID           NUMBER(13) not null,
   ROLE_ID      VARCHAR2(32),
   AUTHORITY_ID VARCHAR2(32),
   ENABLED      NUMBER(1)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_ROLES_AUTHORITIES
   is '角色权限表';
 alter table SYS_ROLES_AUTHORITIES
   add constraint PK_PUB_ROLES_AUTHORITY primary key (ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 alter table SYS_ROLES_AUTHORITIES
   add constraint FK_PUB_ROLES_AUTHORITIES_AU foreign key (AUTHORITY_ID)
   references SYS_AUTHORITIES (AUTHORITY_ID);
 alter table SYS_ROLES_AUTHORITIES
   add constraint FK_PUB_ROLES_AUTHORITIES_ROLES foreign key (ROLE_ID)
   references SYS_ROLES (ROLE_ID);



create table SYS_USERS
 (
   USER_ID       VARCHAR2(32) not null,
   USER_ACCOUNT  VARCHAR2(30),
   USER_NAME     VARCHAR2(40),
   USER_PASSWORD VARCHAR2(100),
   USER_DESC     VARCHAR2(100),
   ENABLED       NUMBER(1),
   ISSYS         NUMBER(1),
   USER_DEPT     VARCHAR2(20),
   USER_DUTY     VARCHAR2(10),
   SUB_SYSTEM    VARCHAR2(30)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_USERS
   is '用户表';
 comment on column SYS_USERS.USER_PASSWORD
   is '该密码是经加盐值加密的,格式为password{username}。 比如用户的密码为user,用户名为user,那么通过MD5进行加密的串为: user{user}';
 comment on column SYS_USERS.ISSYS
   is '是否是超级用户';
 comment on column SYS_USERS.USER_DEPT
   is '所在单位';
 comment on column SYS_USERS.USER_DUTY
   is '经理或主任';
 comment on column SYS_USERS.SUB_SYSTEM
   is '该用户所负责的各子系统,可多个,中间用逗号分隔。(目前暂未用,作为保留字段)';
 alter table SYS_USERS
   add constraint PK_PUB_USERS primary key (USER_ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );



create table SYS_USERS_ROLES
 (
   ID      NUMBER(13) not null,
   USER_ID VARCHAR2(32),
   ROLE_ID VARCHAR2(32),
   ENABLED NUMBER(1)
 )
 tablespace FrameworkTest
   pctfree 10
   initrans 1
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 comment on table SYS_USERS_ROLES
   is '用户角色表';
 alter table SYS_USERS_ROLES
   add constraint PK_PUB_USERS_ROLES primary key (ID)
   using index 
   tablespace FrameworkTest
   pctfree 10
   initrans 2
   maxtrans 255
   storage
   (
     initial 64K
     minextents 1
     maxextents unlimited
   );
 alter table SYS_USERS_ROLES
   add constraint FK_USERS_ROLES_ROLES foreign key (ROLE_ID)
   references SYS_ROLES (ROLE_ID);
 alter table SYS_USERS_ROLES
   add constraint FK_USERS_ROLES_USERS foreign key (USER_ID)
   references SYS_USERS (USER_ID);


insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('1303910437484', 'AUTH_xxx', 'xxx', null, null, '01');
 insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('AUTH_LOGIN4', 'AUTH_LOGIN', '登录', 1, 0, '01');
 insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('AUTH_AFTERLOGINWELCOME5', 'AUTH_AFTERLOGINWELCOME', '登录后欢迎界面', 1, 0, '01');
 insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('AUTH_XTSZ_DEPT1', 'AUTH_XTSZ_DEPT', '单位设置', 1, 0, '01');
 insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('AUTH_XTSZ_USER2', 'AUTH_XTSZ_USER', '用户设置、横向查询', 1, 0, '01');
 insert into SYS_AUTHORITIES (AUTHORITY_ID, AUTHORITY_NAME, AUTHORITY_DESC, ENABLED, ISSYS, MODULE)
 values ('AUTH_NODE_MGR3', 'AUTH_NODE_MGR', '节点管理、纵向查询', 1, 0, '01');
 commit;
 
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('1303909883031', 'ff', 'ff', 'action', 'b.jsp', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('1303909847687', 'ff1', 'ff1', 'action', 'b.jsp', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('node_mgr3', 'node_mgr', '节点管理', 'url', '/*/*/Tree.jsp', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('login4', 'login', '登录', 'url', '/login.jsp', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('index5', 'index', '登录后欢迎页面', 'url', '/index.jsp', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('resources_mgr', 'resources_mgr', '资源管理', 'action', '/managerResource', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('horizontal_qry6', 'horizontal_qry', '横向查询', 'action', '/horizontalQuery', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('vertical_qry7', 'vertical_qry', '纵向查询', 'action', '/verticalQuery', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('dep_mgr1', 'dep_mgr', '单位管理', 'action', '/UnitsManager', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('user_mgr2', 'user_mgr', '用户管理', 'action', '/managerUser', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('authority_mgr', 'authority_mgr', '权限管理', 'action', '/managerAuthority', null, 1, 0, null);
 insert into SYS_RESOURCES (RESOURCE_ID, RESOURCE_NAME, RESOURCE_DESC, RESOURCE_TYPE, RESOURCE_STRING, PRIORITY, ENABLED, ISSYS, MODULE)
 values ('role_mgr', 'role_mgr', '角色管理', 'action', '/managerRole', null, null, null, null);
 commit;
 
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (1, 'AUTH_AFTERLOGINWELCOME5', 'index5', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (2, 'AUTH_LOGIN4', 'login4', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (3, 'AUTH_NODE_MGR3', 'node_mgr3', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (4, 'AUTH_XTSZ_DEPT1', 'dep_mgr1', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (5, 'AUTH_XTSZ_USER2', 'user_mgr2', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (7, 'AUTH_XTSZ_USER2', 'horizontal_qry6', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (8, 'AUTH_XTSZ_DEPT1', 'vertical_qry7', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (12, 'AUTH_XTSZ_USER2', 'role_mgr', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (10, 'AUTH_XTSZ_USER2', 'resources_mgr', 1);
 insert into SYS_AUTHORITIES_RESOURCES (ID, AUTHORITY_ID, RESOURCE_ID, ENABLED)
 values (11, 'AUTH_XTSZ_USER2', 'authority_mgr', 1);
 commit;
 
 
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('1303463518765', 'ROLE_dd1', 'dd1', 1, 0, '01');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('1303463949640', 'ROLE_rr1', 'rr1', 1, 0, '02');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_PLATFORMADMIN1', 'ROLE_PLATFORMADMIN', '可管理整个平台的用户、单位设置。', 1, 1, '01');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_USER2', 'ROLE_USER', '普通用户', 1, 0, '01');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_LOGINTOWELCOME4', 'ROLE_LOGINTOWELCOME', '仅登录到欢迎界面!', 1, 0, '01');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_SYSADMIN3', 'ROLE_SYSADMIN', '可管理本系统的用户、单位设置。', 1, 0, '01');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_WORK', 'ROLE_WORK', '作业子系统的角色(试验)', 1, 0, '02');
 insert into SYS_ROLES (ROLE_ID, ROLE_NAME, ROLE_DESC, ENABLED, ISSYS, MODULE)
 values ('ROLE_LOGIN', 'ROLE_LOGIN', '系统登录', 1, 0, '01');
 commit;
 
  insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1, 'ROLE_LOGINTOWELCOME4', 'AUTH_AFTERLOGINWELCOME5', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (2, 'ROLE_PLATFORMADMIN1', 'AUTH_AFTERLOGINWELCOME5', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (3, 'ROLE_PLATFORMADMIN1', 'AUTH_LOGIN4', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (4, 'ROLE_PLATFORMADMIN1', 'AUTH_NODE_MGR3', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (5, 'ROLE_PLATFORMADMIN1', 'AUTH_XTSZ_DEPT1', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (6, 'ROLE_PLATFORMADMIN1', 'AUTH_XTSZ_USER2', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (7, 'ROLE_SYSADMIN3', 'AUTH_XTSZ_DEPT1', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (8, 'ROLE_SYSADMIN3', 'AUTH_XTSZ_USER2', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (9, 'ROLE_USER2', 'AUTH_LOGIN4', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (10, 'ROLE_LOGINTOWELCOME4', 'AUTH_LOGIN4', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (11, 'ROLE_USER2', 'AUTH_AFTERLOGINWELCOME5', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463962718, '1303463949640', 'AUTH_LOGIN4', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463972234, 'ROLE_WORK', 'AUTH_LOGIN4', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463972235, 'ROLE_WORK', 'AUTH_AFTERLOGINWELCOME5', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463972250, 'ROLE_WORK', 'AUTH_XTSZ_DEPT1', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463972251, 'ROLE_WORK', 'AUTH_XTSZ_USER2', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303463972265, 'ROLE_WORK', 'AUTH_NODE_MGR3', 1);
 insert into SYS_ROLES_AUTHORITIES (ID, ROLE_ID, AUTHORITY_ID, ENABLED)
 values (1303287600015, 'ROLE_LOGIN', 'AUTH_LOGIN4', 1);
 commit;
 
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304494573750', 'dzg', 'dzg', 'c7d3f4c857bc8c145d6e5d40c1bf23d9', null, 1, 0, '10011001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304490737406', 'dzg', 'dzg', 'c7d3f4c857bc8c145d6e5d40c1bf23d9', null, 1, 0, '10011001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304574079546', 'ddd', 'ddd', '0a4f6a961276619f7f91356bcba5a746', null, 0, 0, null, null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304573363921', 'dzg', '董正光', '09eb37d219cfa835db40e5ab587f7082', '普通仅登录到欢迎界面!', 0, 0, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304573484515', 'lll', 'lll', '47acedc22cef8c3762c21a435e262d67', null, 1, 0, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('admin1', 'admin', '系统管理员', 'ceb4f32325eda6142bd65215f4c0f371', '超级系统管理员', 1, 1, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('user2', 'user', '普通用户', '47a733d60998c719cf3526ae7d106d13', '普通用户', 1, 0, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('sysUser3', 'sysUser', '系统设置维护', '8f0295328c34f8eedc2362e9f4a10b7e', '系统设置用户', 1, 0, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('dzg4', 'dzg', '董正光', 'c7d3f4c857bc8c145d6e5d40c1bf23d9', '普通仅登录到欢迎界面!', 1, 0, '1001', null, '01');
 insert into SYS_USERS (USER_ID, USER_ACCOUNT, USER_NAME, USER_PASSWORD, USER_DESC, ENABLED, ISSYS, USER_DEPT, USER_DUTY, SUB_SYSTEM)
 values ('1304566319625', 'dzg5', 'lx5', '1abe40ed6d0da1c834586e8ecef61fe7', null, 0, 0, '10011001', null, '01');
 commit;

 insert into SYS_USERS_ROLES (ID, USER_ID, ROLE_ID, ENABLED)
 values (1, 'admin1', 'ROLE_PLATFORMADMIN1', 1);
 insert into SYS_USERS_ROLES (ID, USER_ID, ROLE_ID, ENABLED)
 values (2, 'sysUser3', 'ROLE_SYSADMIN3', 1);
 insert into SYS_USERS_ROLES (ID, USER_ID, ROLE_ID, ENABLED)
 values (3, 'user2', 'ROLE_USER2', 1);
 insert into SYS_USERS_ROLES (ID, USER_ID, ROLE_ID, ENABLED)
 values (4, 'dzg4', 'ROLE_LOGINTOWELCOME4', 1);
 insert into SYS_USERS_ROLES (ID, USER_ID, ROLE_ID, ENABLED)
 values (5, '1304573484515', '1303463518765', null);
 commit;

user FRAMEWORKTEST 已创建。
grant 成功。
user FRAMEWORKTEST已删除。
tablespace FRAMEWORKTEST已删除。
tablespace FRAMEWORKTEST 已创建。
tablespace FRAMEWORK_TMP已删除。
temporary TABLESPACE 已创建。
user FRAMEWORKTEST 已创建。
grant 成功。

执行时注意自己的环境和目录名称等相关的参数。

整体运行会报错,先创建再运行删除。


下一篇,Java脚本及配置。

















你可能感兴趣的:(spring,security,oracle)