打印了JENKINS节点日志

This commit is contained in:
dengqichen 2025-11-11 09:17:36 +08:00
parent 532e43f736
commit 36f8f92f85
2 changed files with 11 additions and 18 deletions

View File

@ -57,8 +57,7 @@ public class DependencyInjectionPostProcessor implements BeanPostProcessor, Disp
return injectServiceDependencies(service, beanName); return injectServiceDependencies(service, beanName);
} }
} catch (Exception e) { } catch (Exception e) {
String errorMsg = String.format("依赖注入失败 - Bean: %s, 类型: %s, 原因: %s", String errorMsg = String.format("依赖注入失败 - Bean: %s, 类型: %s, 原因: %s", beanName, bean.getClass().getName(), e.getMessage());
beanName, bean.getClass().getName(), e.getMessage());
log.error(errorMsg, e); log.error(errorMsg, e);
throw new DependencyInjectionException(errorMsg, e); throw new DependencyInjectionException(errorMsg, e);
} }
@ -81,9 +80,7 @@ public class DependencyInjectionPostProcessor implements BeanPostProcessor, Disp
try { try {
IBaseService<T, D, Q, ID> service = (IBaseService<T, D, Q, ID>) cachedService; IBaseService<T, D, Q, ID> service = (IBaseService<T, D, Q, ID>) cachedService;
ReflectionUtils.setField("service", controller, service); ReflectionUtils.setField("service", controller, service);
log.debug("Successfully injected service {} for controller {}", log.debug("Successfully injected service {} for controller {}", service.getClass().getSimpleName(), controller.getClass().getSimpleName());
service.getClass().getSimpleName(),
controller.getClass().getSimpleName());
} catch (Exception e) { } catch (Exception e) {
throw new DependencyInjectionException( throw new DependencyInjectionException(
String.format("Failed to inject service for controller: %s", controller.getClass().getSimpleName()), String.format("Failed to inject service for controller: %s", controller.getClass().getSimpleName()),
@ -150,8 +147,7 @@ public class DependencyInjectionPostProcessor implements BeanPostProcessor, Disp
log.debug("Successfully injected all dependencies for service: {}", beanName); log.debug("Successfully injected all dependencies for service: {}", beanName);
return service; return service;
} catch (Exception e) { } catch (Exception e) {
throw new DependencyInjectionException( throw new DependencyInjectionException(String.format("Failed to inject dependencies for service: %s", service.getClass().getSimpleName()), e);
String.format("Failed to inject dependencies for service: %s", service.getClass().getSimpleName()), e);
} }
} }
@ -251,18 +247,15 @@ public class DependencyInjectionPostProcessor implements BeanPostProcessor, Disp
Field instanceField = qClass.getDeclaredField(fieldName); Field instanceField = qClass.getDeclaredField(fieldName);
return (EntityPath<?>) instanceField.get(null); return (EntityPath<?>) instanceField.get(null);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
String errorMsg = String.format("找不到 QueryDSL 实体类 - 服务类: %s, 实体类: %s, Q类名: %s", String errorMsg = String.format("找不到 QueryDSL 实体类 - 服务类: %s, 实体类: %s, Q类名: %s", service.getClass().getName(), key.getSimpleName(), qClassName);
service.getClass().getName(), key.getSimpleName(), qClassName);
log.error(errorMsg, e); log.error(errorMsg, e);
throw new DependencyInjectionException(errorMsg, e); throw new DependencyInjectionException(errorMsg, e);
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
String errorMsg = String.format("找不到 QueryDSL 实体字段 - 服务类: %s, 实体类: %s, Q类名: %s", String errorMsg = String.format("找不到 QueryDSL 实体字段 - 服务类: %s, 实体类: %s, Q类名: %s", service.getClass().getName(), key.getSimpleName(), qClassName);
service.getClass().getName(), key.getSimpleName(), qClassName);
log.error(errorMsg, e); log.error(errorMsg, e);
throw new DependencyInjectionException(errorMsg, e); throw new DependencyInjectionException(errorMsg, e);
} catch (Exception e) { } catch (Exception e) {
String errorMsg = String.format("获取 QueryDSL 实体失败 - 服务类: %s, 实体类: %s, Q类名: %s, 原因: %s", String errorMsg = String.format("获取 QueryDSL 实体失败 - 服务类: %s, 实体类: %s, Q类名: %s, 原因: %s", service.getClass().getName(), key.getSimpleName(), qClassName, e.getMessage());
service.getClass().getName(), key.getSimpleName(), qClassName, e.getMessage());
log.error(errorMsg, e); log.error(errorMsg, e);
throw new DependencyInjectionException(errorMsg, e); throw new DependencyInjectionException(errorMsg, e);
} }
@ -270,8 +263,7 @@ public class DependencyInjectionPostProcessor implements BeanPostProcessor, Disp
ReflectionUtils.setField("entityPath", service, entityPath); ReflectionUtils.setField("entityPath", service, entityPath);
} catch (Exception e) { } catch (Exception e) {
String errorMsg = String.format("注入 EntityPath 失败 - 服务类: %s, 实体类: %s, 原因: %s", String errorMsg = String.format("注入 EntityPath 失败 - 服务类: %s, 实体类: %s, 原因: %s", service.getClass().getName(), entityClass.getSimpleName(), e.getMessage());
service.getClass().getName(), entityClass.getSimpleName(), e.getMessage());
log.error(errorMsg, e); log.error(errorMsg, e);
throw new DependencyInjectionException(errorMsg, e); throw new DependencyInjectionException(errorMsg, e);
} }

View File

@ -142,9 +142,10 @@ SELECT 1, id FROM sys_menu; -- 管理员拥有所有菜单权限
INSERT INTO sys_role_menu (role_id, menu_id) INSERT INTO sys_role_menu (role_id, menu_id)
VALUES VALUES
(1, 99), -- 管理员拥有工作台权限 -- 运维拥有工作台、运维管理和资源管理权限
(2, 99), (2, 200), (2, 201), (2, 202), (2, 203), (2, 204), (2, 205), (2, 300), (2, 301), (2, 302), (2, 303), (2, 304), -- 运维拥有工作台、运维管理和资源管理权限 (2, 99), (2, 200), (2, 201), (2, 202), (2, 203), (2, 204), (2, 205), (2, 300), (2, 301), (2, 302), (2, 303), (2, 304),
(3, 99), (3, 100), (3, 101), (3, 102), (3, 104), (3, 200), (3, 202); -- 开发拥有工作台、工作流和应用管理权限 -- 开发拥有工作台、工作流子菜单和应用管理(不包含父菜单)
(3, 99), (3, 101), (3, 102), (3, 104), (3, 202);
-- ==================== 初始化权限数据 ==================== -- ==================== 初始化权限数据 ====================
DELETE FROM sys_permission WHERE id < 10000; DELETE FROM sys_permission WHERE id < 10000;