To create the project we use Spring Cloud Gateway, Hystrix Cloud Circuit Breaker, Eureka Service Discovery from the Spring Cloud Netflix technology stack.
-
User Service : http://localhost:8000
-
Group Service : http://localhost:8100
-
Role Service : http://localhost:8200
-
Eureka Discovery Service : http://localhost:8761
-
Spring Cloud Gateway : http://localhost:8765
- Create User_Table (user_id, create_date, last_modified_date, user_name, first_name, last_name)
- Create User_Group_Mapping_Table (user_group_id, user_id, group_id)
- Create Group_Table (group_id, create_date, last_modified_date, group_name, group_description)
- Create Group_Role_Mapping_Table (group_role_id, group_id, role_id)
- Create Roles_Table (role_id, create_date, last_modified_date, role_name, role_description)
- Modify basic profile of a User based on user_name
- Modify basic details of a Group based on group_id
- Modify basic details of a Role based on role_id
- Delete a User, Group, Role
- Add one or more Roles to a Group
- Remove one or more Roles from a Group
- Add a User to one or more Groups
- Remove a User from one or more Groups
- Get all Users, Groups, Roles
- Given a user_name, return the basic profile
- Given a user_name/userid, return the basic profile & list of group names
- Given a group_id, return the basic group details
- Given a group_id, return the basic group details & the list of role names
- Given a role_id, return the basic role details
- Given a user_name and group_id return true or false depending on whether the group is assigned to user
- Given a user_name and role_id, return true or false depending on whether the role is assigned to user
create table user_table (user_id bigint not null auto_increment, create_date datetime, first_name varchar(255), last_modified_date datetime, last_name varchar(255), user_name varchar(255), primary key (user_id)) engine=InnoDB;
alter table user_table add constraint UK_p50irg6kthpq3f33xu9r1kw4x unique (user_name);
create table user_group_mapping_table (user_group_id bigint not null auto_increment, group_id bigint, user_id bigint, primary key (user_group_id)) engine=InnoDB;
alter table user_group_mapping_table add constraint UK5rhnboke9fcw3ok6rfpvfeda4 unique (user_id, group_id);
create table group_table (group_id bigint not null auto_increment, create_date datetime, group_description varchar(255), group_name varchar(255), last_modified_date datetime, primary key (group_id)) engine=InnoDB;
alter table group_table add constraint UK_5awb2k4ure0fi6kk52ui3hyvk unique (group_name);
create table group_role_mapping_table (group_role_id bigint not null auto_increment, group_id bigint, role_id bigint, primary key (group_role_id)) engine=InnoDB;
alter table group_role_mapping_table add constraint UKi8npy666oxm10heecsn6vusah unique (group_id, role_id);
create table role_table (role_id bigint not null auto_increment, create_date datetime, last_modified_date datetime, role_description varchar(255), role_name varchar(255), primary key (role_id)) engine=InnoDB;
alter table role_table add constraint UK_kqtgs1ar590vxi6vvfti5sej9 unique (role_name);