SCIM optimize

This commit is contained in:
MaxKey
2021-11-13 11:30:07 +08:00
parent 681906e02a
commit 2cd04e788f
51 changed files with 961 additions and 221 deletions

View File

@@ -94,7 +94,7 @@ public class MaxKeyMgtJobs implements InitializingBean {
.build();
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put("groupsService", groupsService);
jobDataMap.put("service", groupsService);
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronSchedule);
CronTrigger cronTrigger =
@@ -121,7 +121,7 @@ public class MaxKeyMgtJobs implements InitializingBean {
.build();
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put("accountsService", accountsService);
jobDataMap.put("service", accountsService);
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronSchedule);
CronTrigger cronTrigger =

View File

@@ -151,11 +151,17 @@ public class MaxKeyMgtMvcConfig implements WebMvcConfigurer {
_logger.debug("add LocaleChangeInterceptor");
/*
* api
* idm
* scim
* */
registry.addInterceptor(restApiPermissionAdapter)
.addPathPatterns("/im/api/**")
.addPathPatterns("/api/**")
.addPathPatterns("/api/idm/**")
.addPathPatterns("/api/idm/scim/**")
;
_logger.debug("add RestApiPermissionAdapter");
}

View File

@@ -54,12 +54,14 @@ public class AccountsStrategyJob implements Job , Serializable {
jobStatus = JOBSTATUS.RUNNING;
try {
if(accountsService == null) {
accountsService = (AccountsService) context.getMergedJobDataMap().get("accountsService");
}
accountsService =
(AccountsService) context.getMergedJobDataMap().get("service");
}else {
accountsService.refreshAllByStrategy();
accountsService.refreshAllByStrategy();
Thread.sleep(10 *1000);
Thread.sleep(10 *1000);
}
_logger.debug("DynamicGroupsJob is success " );
}catch(Exception e) {
_logger.error("Exception " ,e);

View File

@@ -53,12 +53,14 @@ public class DynamicGroupsJob implements Job , Serializable {
jobStatus = JOBSTATUS.RUNNING;
try {
if(groupsService == null) {
groupsService = (GroupsService) context.getMergedJobDataMap().get("service");
}
groupsService =
(GroupsService) context.getMergedJobDataMap().get("service");
}else {
groupsService.refreshAllDynamicGroups();
groupsService.refreshAllDynamicGroups();
Thread.sleep(10 *1000);
Thread.sleep(10 *1000);
}
_logger.debug("DynamicGroupsJob is success " );
}catch(Exception e) {
_logger.error("Exception " ,e);