mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-20 00:48:09 +08:00
SCIM optimize
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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");
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user