diff --git a/exam-api/src/main/java/com/bc/exam/ExamApplication.java b/exam-api/src/main/java/com/bc/exam/ExamApplication.java index cd73a46..baceea1 100644 --- a/exam-api/src/main/java/com/bc/exam/ExamApplication.java +++ b/exam-api/src/main/java/com/bc/exam/ExamApplication.java @@ -15,7 +15,9 @@ import java.net.UnknownHostException; import java.util.List; /** - * 启动类 + * @Description 描述:应用启动类,Spring Boot主入口及环境初始化 + * @Author A贾宇婷034244310 + * @Date 20260615 */ @Log4j2 @SpringBootApplication diff --git a/exam-api/src/main/java/com/bc/exam/ability/shiro/ShiroRealm.java b/exam-api/src/main/java/com/bc/exam/ability/shiro/ShiroRealm.java index 4d53b78..3d862d2 100644 --- a/exam-api/src/main/java/com/bc/exam/ability/shiro/ShiroRealm.java +++ b/exam-api/src/main/java/com/bc/exam/ability/shiro/ShiroRealm.java @@ -24,14 +24,27 @@ import java.util.List; /** + * Shiro自定义Realm实现 + *

+ * 继承AuthorizingRealm,实现两个核心职责: + * 1. 认证(Authentication):通过doGetAuthenticationInfo校验用户JWT Token的合法性 + * 2. 授权(Authorization):通过doGetAuthorizationInfo加载用户的角色和权限信息 + *

+ *

+ * 当JwtFilter调用Subject.login()时,Shiro框架会自动调用本类中的认证和授权方法。 + *

+ * * @Description 描述:用户登录鉴权和获取用户授权 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Component @Slf4j public class ShiroRealm extends AuthorizingRealm { + /** + * 使用@Lazy延迟注入,避免Shiro在Spring容器初始化阶段过早依赖Service Bean导致循环依赖 + */ @Autowired @Lazy private SysUserService sysUserService; @@ -41,6 +54,16 @@ public class ShiroRealm extends AuthorizingRealm { private SysUserRoleService sysUserRoleService; + /** + * 声明当前Realm支持的Token类型 + *

+ * Shiro框架通过此方法判断是否将Token交给当前Realm处理。 + * 仅当Token为JwtToken类型时,才会调用本Realm的认证/授权方法。 + *

+ * + * @param token Shiro认证令牌 + * @return true-当前Realm支持该Token类型;false-不支持 + */ @Override public boolean supports(AuthenticationToken token) { return token instanceof JwtToken; @@ -48,22 +71,29 @@ public class ShiroRealm extends AuthorizingRealm { /** - * 详细授权认证 - * @param principals - * @return + * 授权认证:加载当前用户的角色和权限信息 + *

+ * 当请求中使用了@RequiresRoles、@RequiresPermissions等Shiro注解时, + * Shiro框架会自动调用此方法获取用户的授权信息,用于后续的权限判断。 + *

+ * + * @param principals 用户主体集合,包含认证成功后存储的用户信息(SysUserLoginDTO) + * @return 包含用户角色和权限的授权信息对象 */ @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { String userId = null; if (principals != null) { + // 从主体集合中获取认证时存储的用户登录信息 SysUserLoginDTO user = (SysUserLoginDTO) principals.getPrimaryPrincipal(); userId = user.getId(); } SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); - // 查找用户角色 + // 根据用户ID查询该用户拥有的所有角色列表 List roles = sysUserRoleService.listRoles(userId); + // 将角色列表设置到授权信息中,供Shiro进行角色权限校验 info.setRoles(new HashSet<>(roles)); log.info("++++++++++校验详细权限完成"); @@ -71,47 +101,65 @@ public class ShiroRealm extends AuthorizingRealm { } /** - * 校验用户的账号密码是否正确 - * @param auth - * @return - * @throws AuthenticationException + * 身份认证:校验用户提交的JWT Token是否合法 + *

+ * 当JwtFilter调用Subject.login(jwtToken)时,Shiro框架会回调此方法。 + * 方法内部提取Token中的用户信息并校验Token有效性, + * 返回的SimpleAuthenticationInfo中principal为用户对象,credentials为原始Token字符串。 + *

+ * + * @param auth 认证令牌,包含用户提交的JWT Token(通过getCredentials()获取) + * @return 认证信息对象,包含用户主体(principal)和凭证(credentials) + * @throws AuthenticationException 当Token为空或校验失败时抛出 */ @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException { + // 从认证令牌中提取JWT Token字符串(JwtToken的getCredentials()返回的是Token字符串) String token = (String) auth.getCredentials(); if (token == null) { throw new AuthenticationException("token为空!"); } - // 校验token有效性 + // 校验Token有效性:解析用户名、查询用户信息、验证Token签名和过期时间 SysUserLoginDTO user = this.checkToken(token); + // 构造认证信息:user作为principal(后续可通过Subject.getPrincipal()获取), + // token作为credentials,getName()返回当前Realm名称 return new SimpleAuthenticationInfo(user, token, getName()); } /** - * 校验Token的有效性 - * @param token - * @return - * @throws AuthenticationException + * 校验JWT Token的有效性 + *

+ * Token校验流程分为三步: + * 1. 从Token中解析用户名(JWT Payload部分) + * 2. 根据用户名从数据库中查询用户信息 + * 3. 验证Token的签名和过期时间 + * 任一步骤失败都会抛出AuthenticationException异常。 + *

+ * + * @param token JWT Token字符串 + * @return 校验通过后返回的用户登录信息DTO + * @throws AuthenticationException 当Token无效、用户不存在或Token已过期时抛出 */ public SysUserLoginDTO checkToken(String token) throws AuthenticationException { // 查询用户信息 log.debug("++++++++++校验用户token: "+ token); - // 从token中获取用户名 + // 第一步:从JWT Token的Payload中解析出用户名 String username = JwtUtils.getUsername(token); log.debug("++++++++++用户名: "+ username); + // 解析失败说明Token格式不正确或已损坏 if (username == null) { throw new AuthenticationException("无效的token"); } - // 查找登录用户对象 + // 第二步:根据用户名从数据库中查找对应的用户登录信息 SysUserLoginDTO user = sysUserService.token(token); - // 校验token是否失效 + // 第三步:校验Token的签名完整性和是否已过期 if (!JwtUtils.verify(token, username)) { throw new AuthenticationException("登陆失效,请重试登陆!"); } @@ -122,8 +170,13 @@ public class ShiroRealm extends AuthorizingRealm { /** - * 清除当前用户的权限认证缓存 - * @param principals + * 清除指定用户的认证/授权缓存 + *

+ * 当用户信息发生变更(如角色调整、权限修改)时,可调用此方法 + * 清除该用户在Shiro中的缓存,使下次请求时重新执行认证和授权逻辑。 + *

+ * + * @param principals 待清除缓存的用户主体标识集合 */ @Override public void clearCache(PrincipalCollection principals) { diff --git a/exam-api/src/main/java/com/bc/exam/ability/shiro/aop/JwtFilter.java b/exam-api/src/main/java/com/bc/exam/ability/shiro/aop/JwtFilter.java index 3bd78ce..7916fe7 100644 --- a/exam-api/src/main/java/com/bc/exam/ability/shiro/aop/JwtFilter.java +++ b/exam-api/src/main/java/com/bc/exam/ability/shiro/aop/JwtFilter.java @@ -14,42 +14,70 @@ import javax.servlet.http.HttpServletResponse; /** + * JWT认证过滤器 + *

+ * 作为Shiro过滤链中的核心认证组件,拦截所有需要鉴权的HTTP请求。 + * 工作流程:从请求头中提取JWT Token -> 封装为JwtToken对象 -> 提交给ShiroRealm进行认证。 + * 继承BasicHttpAuthenticationFilter以融入Shiro的过滤器链机制。 + *

+ * * @Description 描述:鉴权登录拦截器 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Slf4j public class JwtFilter extends BasicHttpAuthenticationFilter { /** - * 执行登录认证 - * @param request - * @param response - * @param mappedValue - * @return + * 判断当前请求是否允许访问(Shiro过滤器链的入口方法) + *

+ * Shiro在处理每个请求时会调用此方法来决定是否放行。 + * 内部调用executeLogin完成JWT认证,认证成功则放行,失败则返回统一错误响应。 + *

+ * + * @param request 当前HTTP请求对象 + * @param response 当前HTTP响应对象 + * @param mappedValue 过滤器链中配置的权限标识(如perms、roles等),此处未使用 + * @return true-认证通过,允许访问;false-认证失败,拒绝访问 */ @Override protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) { try { + // 尝试执行JWT登录认证流程 executeLogin(request, response); return true; } catch (Exception e) { - // 写出统一错误信息 + // 认证失败时,向客户端写出统一的错误响应信息(如401未授权) InjectUtils.restError((HttpServletResponse) response); return false; } } + /** + * 执行JWT登录认证 + *

+ * 从HTTP请求头中提取JWT Token,封装为Shiro可识别的JwtToken对象, + * 然后提交给Shiro的Subject进行登录。Shiro会将JwtToken传递给ShiroRealm的 + * doGetAuthenticationInfo方法完成实际的身份校验。 + *

+ * + * @param request 当前HTTP请求对象,用于获取Token请求头 + * @param response 当前HTTP响应对象 + * @return true-登录成功;若登录失败则抛出异常由上层捕获 + * @throws Exception 当Token无效或认证失败时抛出异常 + */ @Override protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception { HttpServletRequest httpServletRequest = (HttpServletRequest) request; + // 从请求头中获取JWT Token(Token字段名定义在Constant.TOKEN常量中) String token = httpServletRequest.getHeader(Constant.TOKEN); + // 将原始Token字符串封装为Shiro的认证令牌对象 JwtToken jwtToken = new JwtToken(token); - // 提交给realm进行登入,如果错误他会抛出异常并被捕获 + // 提交给ShiroRealm进行身份认证,如果Token无效,Realm会抛出AuthenticationException getSubject(request, response).login(jwtToken); - // 如果没有抛出异常则代表登入成功,返回true + // 如果没有抛出异常则代表认证成功,返回true放行 return true; } } diff --git a/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtToken.java b/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtToken.java index d8ca7f0..90cf503 100644 --- a/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtToken.java +++ b/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtToken.java @@ -4,9 +4,9 @@ import lombok.Data; import org.apache.shiro.authc.AuthenticationToken; /** - * @Description 描述: + * @Description 描述:* @Author A贾宇婷034244310 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data public class JwtToken implements AuthenticationToken { diff --git a/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtUtils.java b/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtUtils.java index dce2684..bfc9f52 100644 --- a/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtUtils.java +++ b/exam-api/src/main/java/com/bc/exam/ability/shiro/jwt/JwtUtils.java @@ -13,7 +13,7 @@ import java.util.Date; /** * @Description 描述:JWT工具类 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ public class JwtUtils { diff --git a/exam-api/src/main/java/com/bc/exam/aspect/DictAspect.java b/exam-api/src/main/java/com/bc/exam/aspect/DictAspect.java index 9c798e3..0b8f166 100644 --- a/exam-api/src/main/java/com/bc/exam/aspect/DictAspect.java +++ b/exam-api/src/main/java/com/bc/exam/aspect/DictAspect.java @@ -25,9 +25,26 @@ import java.util.List; /** + * 数据字典翻译AOP切面 + *

+ * 拦截所有Controller方法的返回结果,自动将带有@Dict注解的字段从字典编码翻译为可读文本。 + * 翻译后的文本以"字段名_dictText"的形式追加到返回的JSON对象中。 + * 同时处理Date类型字段的格式化输出。 + *

+ *

+ * 支持的数据结构: + * - 单个对象:直接遍历字段进行翻译 + * - 列表(List):遍历每个元素进行翻译 + * - 分页结果(IPage):遍历分页记录进行翻译 + * - 嵌套List字段:递归处理子列表中的字典翻译 + *

+ *

+ * 注意:当前@Component注解被注释,如需启用字典翻译功能需取消注释或通过其他方式注册为Spring Bean。 + *

+ * * @Description 描述:数据字典AOP类,处理数据字典值 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260616 */ @Aspect //@Component @@ -35,14 +52,19 @@ import java.util.List; public class DictAspect { + /** 字典服务,用于根据字典编码查询对应的可读文本 */ @Autowired private SysDictService sysDictService; /** - * 切入Controller执行 - * @param pjp - * @return - * @throws Throwable + * 环绕通知:切入所有Controller方法执行前后 + *

+ * 切点表达式匹配com.bc.exam包下所有Controller类的public方法, + * 在方法执行完成后对返回结果进行字典翻译处理。 + *

+ * @param pjp 连接点对象,封装了目标方法的执行信息 + * @return 经过字典翻译处理后的返回结果 + * @throws Throwable 目标方法执行过程中抛出的异常 */ @Around("execution(public * com.bc.exam..*.*Controller.*(..))") public Object doAround(ProceedingJoinPoint pjp) throws Throwable { @@ -50,25 +72,30 @@ public class DictAspect { } /** - * 进行翻译并返回,调用前必须实现:BaseDictService - * - * @param pjp - * @return - * @throws Throwable + * 执行目标方法并对返回结果进行字典翻译 + *

+ * 调用前必须确保SysDictService已正确配置并注入。 + *

+ * @param pjp 连接点对象 + * @return 翻译处理后的返回结果 + * @throws Throwable 目标方法执行异常 */ public Object translate(ProceedingJoinPoint pjp) throws Throwable { - // 处理字典 + // 先执行目标方法获取返回结果,再对结果进行字典翻译处理 return this.parseAllDictText(pjp.proceed()); } /** * 转换全部数据字典 - * - * @param result + *

+ * 仅对ApiRest类型的返回值进行字典翻译处理,其他类型直接透传。 + *

+ * @param result Controller方法的返回结果 + * @return 处理后的返回结果(ApiRest类型会被翻译,其他类型原样返回) */ private Object parseAllDictText(Object result) { - // 非ApiRest类型不处理 + // 仅ApiRest统一响应格式才进行字典翻译,非ApiRest类型直接返回不做处理 if (result instanceof ApiRest) { parseFullDictText(result); } @@ -78,45 +105,53 @@ public class DictAspect { /** - * 转换所有类型的数据字典、包含子列表 - * - * @param result + * 解析并翻译ApiRest响应体中的所有数据字典字段 + *

+ * 根据data字段的实际类型分三种情况处理: + * 1. 分页对象(IPage):遍历分页记录逐条翻译 + * 2. 列表对象(List):遍历列表元素逐条翻译 + * 3. 单个对象:直接进行字段翻译 + * 基本数据类型和null值不做处理。 + *

+ * @param result ApiRest统一响应对象 */ private void parseFullDictText(Object result) { try { + // 从ApiRest中提取实际业务数据 Object rest = ((ApiRest) result).getData(); - // 不处理普通数据类型 + // null值或基本数据类型(String、Integer等)无需字典翻译,直接跳过 if (rest == null || this.isBaseType(rest.getClass())) { return; } - // 分页的 + // 处理分页查询结果:遍历分页记录(records)逐条翻译字典字段 if (rest instanceof IPage) { List items = new ArrayList<>(16); for (Object record : ((IPage) rest).getRecords()) { Object item = this.parseObject(record); items.add(item); } + // 用翻译后的记录替换原始分页记录 ((IPage) rest).setRecords(items); return; } - // 数据列表的 + // 处理列表查询结果:遍历列表中每个元素进行字典翻译 if (rest instanceof List) { List items = new ArrayList<>(); for (Object record : ((List) rest)) { Object item = this.parseObject(record); items.add(item); } - // 重新回写值 + // 将翻译后的列表重新写回ApiRest的data字段 ((ApiRest) result).setData(items); return; } - // 处理单对象 + // 处理单个对象:直接对对象的字段进行字典翻译 Object item = this.parseObject(((ApiRest) result).getData()); ((ApiRest) result).setData(item); @@ -126,10 +161,17 @@ public class DictAspect { } /** - * 处理数据字典值 - * - * @param record - * @return + * 处理单个对象的字典翻译和日期格式化 + *

+ * 处理流程: + * 1. 将对象序列化为JSON再解析为JSONObject,便于动态添加翻译字段 + * 2. 遍历对象所有字段,按类型分别处理: + * - List类型字段:递归调用processList处理嵌套列表 + * - 带@Dict注解的字段:查询字典服务翻译编码为可读文本,结果以"字段名_dictText"存储 + * - Date类型字段:按@JsonFormat注解指定的格式或默认格式(yyyy-MM-dd HH:mm:ss)格式化 + *

+ * @param record 待处理的业务对象 + * @return 处理后的JSONObject(包含字典翻译字段和格式化日期),null输入则返回null */ public Object parseObject(Object record) { @@ -137,18 +179,19 @@ public class DictAspect { return null; } - // 不处理普通数据类型 + // 基本数据类型(String、Number等)没有复杂字段,无需翻译处理 if (this.isBaseType(record.getClass())) { return record; } - // 转换JSON字符 + // 将对象转为JSON格式处理,便于动态添加字典翻译字段(如xxx_dictText) String json = JSON.toJSONString(record); JSONObject item = JSONObject.parseObject(json); + // 遍历对象的所有字段(包括父类字段),逐个进行翻译或格式化处理 for (Field field : Reflections.getAllFields(record)) { - // 如果是List类型 + // 分支1:List类型字段 - 递归处理嵌套列表中的字典翻译 if (List.class.isAssignableFrom(field.getType())) { try { List list = this.processList(field, item.getObject(field.getName(), List.class)); @@ -160,37 +203,39 @@ public class DictAspect { continue; } - // 处理普通字段 + // 分支2:带@Dict注解的字段 - 从字典表查询编码对应的可读文本 if (field.getAnnotation(Dict.class) != null) { - String code = field.getAnnotation(Dict.class).dicCode(); - String text = field.getAnnotation(Dict.class).dicText(); - String table = field.getAnnotation(Dict.class).dictTable(); - String key = String.valueOf(item.get(field.getName())); + String code = field.getAnnotation(Dict.class).dicCode(); // 字典编码字段名 + String text = field.getAnnotation(Dict.class).dicText(); // 字典文本字段名 + String table = field.getAnnotation(Dict.class).dictTable(); // 字典表名 + String key = String.valueOf(item.get(field.getName())); // 当前字段的字典编码值 - //翻译字典值对应的txt + // 调用字典服务将编码值翻译为可读文本 String textValue = this.translateDictValue(code, text, table, key); if (StringUtils.isEmpty(textValue)) { textValue = ""; } + // 翻译结果以"字段名_dictText"的命名规则追加到JSON对象中 item.put(field.getName() + "_dictText", textValue); continue; } - //日期格式转换 + // 分支3:Date类型字段 - 按注解格式或默认格式进行日期格式化 if (field.getType().getName().equals("java.util.Date") && item.get(field.getName()) != null) { - // 获取注解 + // 获取字段上的@JsonFormat注解以确定日期格式 JsonFormat ann = field.getAnnotation(JsonFormat.class); - // 格式化方式 + // 日期格式化器 SimpleDateFormat fmt; - // 使用注解指定的 + // 优先使用@JsonFormat注解中指定的日期格式 if (ann != null && !StringUtils.isEmpty(ann.pattern())) { fmt = new SimpleDateFormat(ann.pattern()); } else { - // 默认时间样式 + // 未指定格式时使用默认时间样式 fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); } + // 将时间戳(Long)格式化为日期字符串 item.put(field.getName(), fmt.format(new Date((Long) item.get(field.getName())))); continue; @@ -201,49 +246,55 @@ public class DictAspect { } /** - * 获得类型为List的值 - * - * @param field - * @return + * 处理List类型字段的字典翻译 + *

+ * 通过反射获取List的泛型参数确定元素实际类型, + * 然后将每个列表元素反序列化为实际类型后递归调用parseObject进行字典翻译。 + * 基本数据类型的列表(如List<String>)无需处理直接返回。 + *

+ * @param field List类型的字段对象,用于获取泛型类型信息 + * @param list 字段对应的列表数据 + * @return 经过字典翻译处理的列表,若输入为空则返回空列表 */ private List processList(Field field, List list) { - // 空判断 + // 空列表或null直接返回空集合,避免后续空指针 if (list == null || list.size() == 0) { return new ArrayList<>(); } - // 获得List属性的真实类 + // 通过泛型反射获取List元素的实际数据类型(如List中的User类) Type genericType = field.getGenericType(); Class actualType = null; if (genericType instanceof ParameterizedType) { - // 尝试获取数据类型 + // 从参数化类型中提取第一个泛型参数作为实际类型 ParameterizedType pt = (ParameterizedType) genericType; try { actualType = (Class) pt.getActualTypeArguments()[0]; }catch (Exception e){ + // 泛型类型解析失败,返回原始列表不做处理 return list; } } - // 常规列表无需处理 + // 元素为基本数据类型(如String、Integer等)的列表无需字典翻译 if (isBaseType(actualType)) { return list; } - // 返回列表 + // 对复杂对象列表逐条进行字典翻译处理 List result = new ArrayList<>(16); for (int i = 0; i < list.size(); i++) { - // 创建实例-->赋值-->字典处理 + // 将每个元素先转为JSON再反序列化为实际类型,确保类型准确 Object data = list.get(i); try { data = JSON.parseObject(JSON.toJSONString(data), actualType); }catch (Exception e){ - // 转换出错不处理 + // 反序列化失败时使用原始数据继续处理 } - // 处理后的数据 + // 递归调用parseObject对列表中每个对象进行字典翻译 Object pds = this.parseObject(data); result.add(pds); } @@ -252,22 +303,27 @@ public class DictAspect { } /** - * 翻译实现 - * - * @param code - * @param text - * @param table - * @param key - * @return + * 字典翻译实现:根据字典表、编码字段、文本字段和key值查询对应的可读文本 + *

+ * 通过SysDictService查询指定字典表中,匹配code字段值为key的记录, + * 返回其text字段的值作为翻译结果。 + *

+ * @param code 字典编码字段名(如"code") + * @param text 字典文本字段名(如"name"),即需要返回的翻译结果字段 + * @param table 字典表名(如"sys_dict") + * @param key 当前字段的字典编码值,用于匹配查询 + * @return 字典翻译后的可读文本,查询失败或未找到时返回空字符串 */ private String translateDictValue(String code, String text, String table, String key) { + // key为空时无需查询,直接返回null if (StringUtils.isEmpty(key)) { return null; } try { - // 翻译值 + // 调用字典服务查询翻译文本 String dictText = null; if (!StringUtils.isEmpty(table)) { + // 从指定字典表中,根据code字段匹配key值,返回text字段的翻译结果 dictText = sysDictService.findDict(table, text, code, key.trim()); } @@ -275,16 +331,20 @@ public class DictAspect { return dictText; } } catch (Exception e) { + // 字典查询异常时不影响主流程,打印堆栈后返回空字符串 e.printStackTrace(); } return ""; } /** - * 判断是否基本类型 - * - * @param clazz - * @return + * 判断给定类型是否为基本类型(无需字典翻译的简单类型) + *

+ * 基本类型包括:8种包装类型(Integer/Byte/Long/Double/Float/Character/Short/Boolean)、 + * String类型以及Number类型。这些类型不包含@Dict注解字段,无需进行字典翻译处理。 + *

+ * @param clazz 待判断的类 + * @return true表示是基本类型无需翻译,false表示是复杂对象需要翻译 */ private boolean isBaseType(Class clazz) { diff --git a/exam-api/src/main/java/com/bc/exam/aspect/mybatis/QueryInterceptor.java b/exam-api/src/main/java/com/bc/exam/aspect/mybatis/QueryInterceptor.java index a2d97a3..bf38d84 100644 --- a/exam-api/src/main/java/com/bc/exam/aspect/mybatis/QueryInterceptor.java +++ b/exam-api/src/main/java/com/bc/exam/aspect/mybatis/QueryInterceptor.java @@ -26,61 +26,95 @@ import java.util.Properties; /** - * @Description 描述:查询拦截器,用于拦截处理通用的信息、如用户ID、多租户信息等; - * 特别注意:此处继承了PaginationInterceptor分页,分页必须在拦截数据后执行,否则容易出现分页不准确,分页计数大于实际数量等问题 + * MyBatis查询拦截器 + *

+ * 继承自MyBatis-Plus的PaginationInterceptor,在提供分页能力的同时扩展了自定义查询条件注入功能。 + * 核心作用:拦截所有SELECT查询,将SQL中的{{userId}}占位符自动替换为当前登录用户的ID, + * 实现数据权限的自动过滤,无需在业务代码中手动拼接用户ID条件。 + *

+ *

+ * 工作原理: + * 1. 通过@Intercepts注解拦截StatementHandler的prepare方法(SQL准备阶段) + * 2. 获取原始SQL,检查是否包含{{userId}}占位符 + * 3. 若包含占位符,通过Shiro获取当前登录用户ID并进行替换 + * 4. 将替换后的SQL回写到BoundSql中,再交由父类PaginationInterceptor处理分页逻辑 + *

+ * @see PaginationInterceptor MyBatis-Plus分页拦截器(父类) * - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Description 描述:查询拦截器,用于拦截处理通用的信息、如用户ID、多租户信息等; + * @Author B吉柯梦034244314 + * @Date 20260616 */ @Log4j2 @Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class}),}) public class QueryInterceptor extends PaginationInterceptor implements Interceptor { - /** - * 客户ID - */ + /** SQL中用户ID占位符标识,在Mapper XML的SQL语句中使用此占位符实现自动用户过滤 */ private static final String USER_FILTER = "{{userId}}"; + /** + * 拦截MyBatis的SQL准备阶段,对SELECT查询自动注入用户ID过滤条件 + *

+ * 处理流程: + * 1. 通过MetaObject反射获取MappedStatement和BoundSql + * 2. 仅对SELECT类型的SQL进行处理 + * 3. 检查SQL中是否包含{{userId}}占位符,不包含则跳过 + * 4. 替换占位符后回写SQL,再交由父类处理分页 + *

+ * @param invocation MyBatis拦截器调用对象,包含目标方法及其参数 + * @return SQL执行结果 + * @throws Throwable 拦截过程中可能抛出的异常 + */ @Override public Object intercept(Invocation invocation) throws Throwable { StatementHandler statementHandler = (StatementHandler) invocation.getTarget(); - //通过MetaObject优雅访问对象的属性,这里是访问statementHandler的属性 + // 通过MetaObject反射机制访问StatementHandler内部属性 MetaObject metaObject = MetaObject.forObject(statementHandler, SystemMetaObject.DEFAULT_OBJECT_FACTORY, SystemMetaObject.DEFAULT_OBJECT_WRAPPER_FACTORY, new DefaultReflectorFactory()); - //先拦截到RoutingStatementHandler,里面有个StatementHandler类型的delegate变量,其实现类是BaseStatementHandler,然后就到BaseStatementHandler的成员变量mappedStatement + // 获取delegate(RoutingStatementHandler)中的MappedStatement,包含SQL元信息 MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement"); - //sql语句类型 + // 获取SQL语句类型(SELECT/INSERT/UPDATE/DELETE) SqlCommandType sqlCommandType = mappedStatement.getSqlCommandType(); - // 只过滤查询的 + // 仅对SELECT查询语句进行用户ID占位符替换处理 if (SqlCommandType.SELECT == sqlCommandType) { - // 获得原始SQL + // 获取原始SQL语句 String sql = statementHandler.getBoundSql().getSql(); - // 不处理 + // 如果SQL中不包含{{userId}}占位符,则无需处理,直接交给父类(分页拦截器)处理 if(!sql.contains(USER_FILTER)){ return super.intercept(invocation); } - // 处理SQL语句 + // 解析SQL并将{{userId}}占位符替换为当前登录用户的实际ID String outSql = this.parseSql(sql); - // 设置SQL + // 将替换后的SQL回写到BoundSql中 metaObject.setValue("delegate.boundSql.sql", outSql); - // 再分页 + // 调用父类PaginationInterceptor的intercept方法处理分页逻辑 return super.intercept(invocation); } + // 非SELECT语句(INSERT/UPDATE/DELETE)直接放行,不做处理 return invocation.proceed(); } + /** + * 创建拦截器代理对象 + * @param target 被拦截的目标对象(StatementHandler) + * @return 包装后的代理对象 + */ @Override public Object plugin(Object target) { return Plugin.wrap(target, this); } + /** + * 设置拦截器属性(当前未使用) + * @param properties 拦截器配置属性 + */ @Override public void setProperties(Properties properties) { @@ -89,57 +123,67 @@ public class QueryInterceptor extends PaginationInterceptor implements Intercept /** - * 获取当前登录用户 - * @return + * 从Shiro安全框架中获取当前登录用户信息 + * @return 当前登录用户的DTO对象,未登录或获取失败时返回null */ private SysUserLoginDTO getLoginUser() { try { + // 通过Shiro的Subject获取当前登录用户的Principal(用户信息) return SecurityUtils.getSubject().getPrincipal() != null ? (SysUserLoginDTO) SecurityUtils.getSubject().getPrincipal() : null; } catch (Exception e) { + // 获取用户信息异常(如未登录状态)时返回null return null; } } /** - * 替换用户ID - * @param sql - * @return + * 将SQL中的{{userId}}占位符替换为当前登录用户的实际ID + * @param sql 包含{{userId}}占位符的原始SQL + * @return 替换用户ID后的SQL,用户ID为空时返回null */ private String processUserId(String sql) { - // 当前用户 + // 获取当前登录用户并提取用户ID SysUserLoginDTO user = this.getLoginUser(); String userId = user.getId(); if(StringUtils.isNotBlank(userId)){ + // 将SQL中所有{{userId}}占位符替换为实际的用户ID return sql.replace(USER_FILTER, userId); } return null; } /** - * 处理注入用户信息 - * @param src - * @return + * 解析SQL并注入用户过滤信息 + *

+ * 使用JSqlParser解析SQL语句,在处理完用户ID替换后重新生成SQL字符串。 + * 解析失败时返回原始SQL,确保不影响正常查询执行。 + *

+ * @param src 待处理的原始SQL语句 + * @return 注入用户信息后的SQL语句,解析异常时返回原始SQL */ private String parseSql(String src) { + // 使用JSqlParser库解析SQL语句 CCJSqlParserManager parserManager = new CCJSqlParserManager(); try { + // 将SQL字符串解析为AST(抽象语法树) Select select = (Select) parserManager.parse(new StringReader(src)); PlainSelect selectBody = (PlainSelect) select.getSelectBody(); - // 过滤客户 + // 将AST转回SQL字符串(JSqlParser可能会规范化SQL格式) String sql = selectBody.toString(); - // 过滤用户ID + // 将{{userId}}占位符替换为当前登录用户ID sql = this.processUserId(sql); - // 获得SQL + // 返回处理完成的SQL return sql; } catch (Exception e) { + // SQL解析失败时打印异常,返回原始SQL保证查询不中断 e.printStackTrace(); } diff --git a/exam-api/src/main/java/com/bc/exam/aspect/mybatis/UpdateInterceptor.java b/exam-api/src/main/java/com/bc/exam/aspect/mybatis/UpdateInterceptor.java index e0b63d7..7b28ccf 100644 --- a/exam-api/src/main/java/com/bc/exam/aspect/mybatis/UpdateInterceptor.java +++ b/exam-api/src/main/java/com/bc/exam/aspect/mybatis/UpdateInterceptor.java @@ -17,9 +17,25 @@ import java.util.Objects; import java.util.Properties; /** + * MyBatis数据更新拦截器 - 自动填充时间字段 + *

+ * 拦截MyBatis的所有INSERT和UPDATE操作,自动为实体对象中的时间字段赋值: + * - INSERT操作:同时自动填充createTime(创建时间)和updateTime(更新时间) + * - UPDATE操作:仅自动填充updateTime(更新时间) + *

+ *

+ * 该拦截器通过反射机制扫描实体对象的所有字段(包括父类字段), + * 当字段名匹配"createTime"或"updateTime"时自动赋值当前时间戳, + * 避免在业务代码中手动设置时间字段,减少重复代码。 + *

+ *

+ * 使用方式:实体类中声明createTime和updateTime字段即可自动生效, + * 字段类型需为java.sql.Timestamp或兼容类型。 + *

+ * * @Description 描述:自动给创建时间和更新时间加值 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260616 */ @Intercepts(value = {@Signature(type = Executor.class, method = "update", args = {MappedStatement.class, Object.class})}) public class UpdateInterceptor extends AbstractSqlParserHandler implements Interceptor { @@ -33,15 +49,29 @@ public class UpdateInterceptor extends AbstractSqlParserHandler implements Inter */ private static final String UPDATE_TIME = "updateTime"; + /** + * 拦截MyBatis的Executor.update方法,自动填充实体对象的时间字段 + *

+ * 处理逻辑: + * 1. 获取SQL操作类型(INSERT或UPDATE)和操作的实体对象 + * 2. 通过反射获取实体所有字段(包括父类继承的字段) + * 3. 遍历字段,匹配createTime和updateTime并按规则赋值当前时间戳 + *

+ * @param invocation MyBatis拦截器调用对象 + * @return 继续执行后续拦截器或实际SQL操作的结果 + * @throws Throwable 反射操作或SQL执行过程中可能抛出的异常 + */ @Override public Object intercept(Invocation invocation) throws Throwable { + // 获取MappedStatement,包含SQL操作类型等元信息 MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0]; - // SQL操作命令 + // 获取SQL操作类型(INSERT/UPDATE/DELETE) SqlCommandType sqlCommandType = mappedStatement.getSqlCommandType(); - // 获取新增或修改的对象参数 + // 获取当前操作的实体对象参数 Object parameter = invocation.getArgs()[1]; - // 获取对象中所有的私有成员变量(对应表字段) + // 通过反射获取实体类的所有声明字段 Field[] declaredFields = parameter.getClass().getDeclaredFields(); + // 同时获取父类的字段,确保继承的createTime/updateTime也能被处理 if (parameter.getClass().getSuperclass() != null) { Field[] superField = parameter.getClass().getSuperclass().getDeclaredFields(); declaredFields = ArrayUtils.addAll(declaredFields, superField); @@ -50,23 +80,36 @@ public class UpdateInterceptor extends AbstractSqlParserHandler implements Inter String fieldName = null; for (Field field : declaredFields) { fieldName = field.getName(); + // 处理createTime字段:仅在INSERT操作时自动填充创建时间 if (Objects.equals(CREATE_TIME, fieldName)) { if (SqlCommandType.INSERT.equals(sqlCommandType)) { field.setAccessible(true); + // 设置创建时间为当前时间戳 field.set(parameter, new Timestamp(System.currentTimeMillis())); } } + // 处理updateTime字段:INSERT和UPDATE操作时都自动填充更新时间 if (Objects.equals(UPDATE_TIME, fieldName)) { if (SqlCommandType.INSERT.equals(sqlCommandType) || SqlCommandType.UPDATE.equals(sqlCommandType)) { field.setAccessible(true); + // 设置更新时间为当前时间戳 field.set(parameter, new Timestamp(System.currentTimeMillis())); } } } + // 时间字段填充完毕,继续执行后续拦截器链或实际的SQL操作 return invocation.proceed(); } + /** + * 创建拦截器代理对象 + *

+ * 仅对Executor类型的目标对象进行代理包装,其他类型直接返回原对象。 + *

+ * @param target 被拦截的目标对象 + * @return Executor类型返回代理对象,其他类型返回原对象 + */ @Override public Object plugin(Object target) { if (target instanceof Executor) { @@ -75,6 +118,10 @@ public class UpdateInterceptor extends AbstractSqlParserHandler implements Inter return target; } + /** + * 设置拦截器属性(当前未使用) + * @param properties 拦截器配置属性 + */ @Override public void setProperties(Properties properties) { } diff --git a/exam-api/src/main/java/com/bc/exam/aspect/utils/InjectUtils.java b/exam-api/src/main/java/com/bc/exam/aspect/utils/InjectUtils.java index 16a3d3a..bcee26e 100644 --- a/exam-api/src/main/java/com/bc/exam/aspect/utils/InjectUtils.java +++ b/exam-api/src/main/java/com/bc/exam/aspect/utils/InjectUtils.java @@ -13,8 +13,8 @@ import java.lang.reflect.Field; /** * @Description 描述:注入工具类 写出统一错误信息 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260616 */ @Log4j2 @Component diff --git a/exam-api/src/main/java/com/bc/exam/config/CorsConfig.java b/exam-api/src/main/java/com/bc/exam/config/CorsConfig.java index b696a23..b460942 100644 --- a/exam-api/src/main/java/com/bc/exam/config/CorsConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/CorsConfig.java @@ -11,24 +11,47 @@ import org.springframework.web.filter.CorsFilter; /** + * 跨域资源共享(CORS)全局配置类 + *

+ * 通过注册CorsFilter过滤器,统一处理所有HTTP请求的跨域问题。 + * 将过滤器优先级设置为最高(HIGHEST_PRECEDENCE),确保跨域处理在其他过滤器之前执行, + * 避免预检请求(OPTIONS)被拦截导致跨域失败。 + *

+ * * @Description 描述:网关全局设置,允许跨域 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ - @Configuration public class CorsConfig { + /** + * 注册CORS跨域过滤器 + *

+ * 配置允许所有来源、所有请求头、所有请求方法的跨域访问, + * 并将过滤器优先级设为最高,保证跨域请求能被正确处理。 + *

+ * @return 配置完成的过滤器注册Bean + */ @Bean public FilterRegistrationBean corsFilter() { + // 创建基于URL路径匹配的CORS配置源 UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + // 创建CORS配置对象 CorsConfiguration config = new CorsConfiguration(); + // 允许携带凭证信息(如Cookie、Authorization头),前端需配合设置withCredentials config.setAllowCredentials(true); + // 允许所有来源域名访问(生产环境建议限制为具体域名) config.addAllowedOrigin(CorsConfiguration.ALL); + // 允许所有请求头通过 config.addAllowedHeader(CorsConfiguration.ALL); + // 允许所有HTTP方法(GET、POST、PUT、DELETE等) config.addAllowedMethod(CorsConfiguration.ALL); + // 将CORS配置应用到所有路径(/**匹配所有URL) source.registerCorsConfiguration("/**", config); + // 将CorsFilter包装为FilterRegistrationBean以便注册到Spring容器 FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source)); + // 设置过滤器优先级为最高,确保跨域处理优先于其他过滤器(如Shiro认证)执行 bean.setOrder(Ordered.HIGHEST_PRECEDENCE); return bean; } diff --git a/exam-api/src/main/java/com/bc/exam/config/MybatisConfig.java b/exam-api/src/main/java/com/bc/exam/config/MybatisConfig.java index c2a88f6..31d3d0b 100644 --- a/exam-api/src/main/java/com/bc/exam/config/MybatisConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/MybatisConfig.java @@ -8,26 +8,47 @@ import org.springframework.context.annotation.Configuration; /** + * MyBatis框架全局配置类 + *

+ * 负责配置MyBatis的核心组件: + * 1. 通过@MapperScan注解自动扫描指定包路径下的Mapper接口,避免逐个注册 + * 2. 注册查询拦截器(QueryInterceptor),用于自动填充通用查询条件(如用户ID过滤) + * 3. 注册更新拦截器(UpdateInterceptor),用于自动填充createTime和updateTime字段 + *

+ *

注意:拦截器的注册顺序很重要,QueryInterceptor继承自分页拦截器,需要优先注册以保证分页逻辑正常执行。

+ * * @Description 描述:Mybatis过滤器配置 注意:必须按顺序进行配置,否则容易出现业务异常 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Configuration -@MapperScan("com.bc.exam.modules.**.mapper") +@MapperScan("com.bc.exam.modules.**.mapper") // 自动扫描所有模块下的mapper包,注册为MyBatis Mapper接口 public class MybatisConfig { /** - * 数据查询过滤器 + * 注册数据查询拦截器 + *

+ * 该拦截器继承自MyBatis-Plus的分页拦截器(PaginationInterceptor), + * 同时扩展了自定义的查询条件自动填充功能(如将SQL中的{{userId}}占位符替换为当前登录用户ID)。 + * limit设置为-1表示默认不限制查询条数,由业务层自行控制分页。 + *

+ * @return 配置完成的查询拦截器实例 */ @Bean public QueryInterceptor queryInterceptor() { QueryInterceptor query = new QueryInterceptor(); + // 设置默认查询条数限制为-1(不限制),实际分页由业务层Page对象控制 query.setLimit(-1L); return query; } /** - * 插入数据过滤器 + * 注册数据更新拦截器 + *

+ * 拦截所有INSERT和UPDATE操作,自动为实体对象的createTime和updateTime字段赋值。 + * INSERT时同时设置createTime和updateTime,UPDATE时仅设置updateTime。 + *

+ * @return 配置完成的更新拦截器实例 */ @Bean public UpdateInterceptor updateInterceptor() { diff --git a/exam-api/src/main/java/com/bc/exam/config/ScheduledConfig.java b/exam-api/src/main/java/com/bc/exam/config/ScheduledConfig.java index b40e0cd..b45d4c3 100644 --- a/exam-api/src/main/java/com/bc/exam/config/ScheduledConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/ScheduledConfig.java @@ -19,7 +19,7 @@ import java.util.concurrent.ThreadPoolExecutor; /** * @Description 描述:任务调度配置 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Log4j2 @Configuration diff --git a/exam-api/src/main/java/com/bc/exam/config/ShiroConfig.java b/exam-api/src/main/java/com/bc/exam/config/ShiroConfig.java index 4a06486..02fd488 100644 --- a/exam-api/src/main/java/com/bc/exam/config/ShiroConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/ShiroConfig.java @@ -24,28 +24,40 @@ import java.util.Map; /** * @Description 描述:Shiro配置类 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Slf4j @Configuration public class ShiroConfig { /** - * Filter Chain定义说明 - * + * 配置Shiro过滤器链 + *

+ * Filter Chain定义说明: * 1、一个URL可以配置多个Filter,使用逗号分隔 * 2、当设置多个过滤器时,全部验证通过,才视为通过 - * 3、部分过滤器可指定参数,如perms,roles + * 3、部分过滤器可指定参数,如perms、roles + *

+ *

+ * 配置思路:先定义不需要认证的白名单路径(anon), + * 再对剩余所有路径(/**)统一使用自定义的JwtFilter进行JWT认证。 + * LinkedHashMap保证路径匹配按配置顺序进行。 + *

+ * + * @param securityManager Shiro安全管理器 + * @return 配置完成的ShiroFilter工厂Bean */ @Bean("shiroFilterFactoryBean") public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) { ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); shiroFilterFactoryBean.setSecurityManager(securityManager); - // 拦截器 + // 定义过滤器链映射,使用LinkedHashMap保证匹配顺序(先匹配的优先) Map map = new LinkedHashMap<>(); - // 需要排除的一些接口 + // ========== 无需认证的接口白名单(anon = anonymous匿名访问) ========== + + // 用户登录、注册相关接口 map.put("/exam/api/sys/user/login", "anon"); map.put("/exam/api/sys/user/reg", "anon"); map.put("/exam/api/sys/user/quick-reg", "anon"); @@ -53,15 +65,18 @@ public class ShiroConfig { // 获取网站基本信息 map.put("/exam/api/sys/config/detail", "anon"); - // 文件读取 + // 文件读取(上传文件的访问路径) map.put("/upload/file/**", "anon"); + // ========== 静态资源和文档页面排除 ========== map.put("/", "anon"); map.put("/v2/**", "anon"); map.put("/doc.html", "anon"); + // JS/CSS/HTML等前端静态资源 map.put("/**/*.js", "anon"); map.put("/**/*.css", "anon"); map.put("/**/*.html", "anon"); + // 图片和文档类静态资源 map.put("/**/*.svg", "anon"); map.put("/**/*.pdf", "anon"); map.put("/**/*.jpg", "anon"); @@ -69,31 +84,50 @@ public class ShiroConfig { map.put("/**/*.gif", "anon"); map.put("/**/*.ico", "anon"); - // 字体 + // 字体文件 map.put("/**/*.ttf", "anon"); map.put("/**/*.woff", "anon"); map.put("/**/*.woff2", "anon"); + // Druid数据库监控页面 map.put("/druid/**", "anon"); + // Swagger API文档相关路径 map.put("/swagger-ui.html", "anon"); map.put("/swagger**/**", "anon"); map.put("/webjars/**", "anon"); - // 添加自己的过滤器并且取名为jwt + // ========== 注册自定义JWT过滤器并应用到所有剩余路径 ========== + // 将JwtFilter注册为名为"jwt"的自定义过滤器 Map filterMap = new HashMap(1); filterMap.put("jwt", new JwtFilter()); shiroFilterFactoryBean.setFilters(filterMap); + // 除上述白名单路径外,所有请求都需要经过JwtFilter进行JWT认证 map.put("/**", "jwt"); shiroFilterFactoryBean.setFilterChainDefinitionMap(map); return shiroFilterFactoryBean; } + /** + * 配置Shiro安全管理器 + *

+ * 核心配置: + * 1. 绑定自定义的ShiroRealm(负责认证和授权逻辑) + * 2. 禁用Shiro内置的Session管理(因为本项目使用无状态的JWT Token认证, + * 不依赖服务端的Session来维持用户登录状态) + *

+ * + * @param myRealm 自定义的ShiroRealm实现,注入由Spring容器管理的ShiroRealm Bean + * @return 配置完成的Web安全管理器 + */ @Bean("securityManager") public DefaultWebSecurityManager securityManager(ShiroRealm myRealm) { DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); + // 设置自定义Realm,Shiro将通过它完成用户认证和授权 securityManager.setRealm(myRealm); + // 禁用Shiro内置的Session存储,实现无状态认证 DefaultSubjectDAO subjectDAO = new DefaultSubjectDAO(); DefaultSessionStorageEvaluator defaultSessionStorageEvaluator = new DefaultSessionStorageEvaluator(); + // 关闭Session持久化,每次请求都通过JWT Token重新认证,不依赖Session defaultSessionStorageEvaluator.setSessionStorageEnabled(false); subjectDAO.setSessionStorageEvaluator(defaultSessionStorageEvaluator); securityManager.setSubjectDAO(subjectDAO); @@ -101,24 +135,52 @@ public class ShiroConfig { } /** - * 下面的代码是添加注解支持 - * @return + * 配置AOP自动代理创建器,启用Shiro注解支持 + *

+ * 使用CGLIB代理(proxyTargetClass=true)而非JDK动态代理, + * 以确保对没有实现接口的类也能正确代理。 + * 设置AdvisorBeanNamePrefix为"_no_advisor"是为了排除不需要被自动代理的Advisor, + * 避免与Shiro的注解拦截器产生冲突。 + *

+ * + * @return AOP自动代理创建器实例 */ @Bean @DependsOn("lifecycleBeanPostProcessor") public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() { DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator(); + // 启用CGLIB代理,支持对普通类(非接口)的AOP代理 defaultAdvisorAutoProxyCreator.setProxyTargetClass(true); + // 开启前缀过滤,排除名称以"_no_advisor"开头的Advisor defaultAdvisorAutoProxyCreator.setUsePrefix(true); defaultAdvisorAutoProxyCreator.setAdvisorBeanNamePrefix("_no_advisor"); return defaultAdvisorAutoProxyCreator; } + /** + * 注册Shiro生命周期处理器 + *

+ * 负责管理Shiro相关Bean的生命周期回调(如初始化init和销毁destroy方法), + * 确保Shiro的SecurityManager等核心组件能够正确地初始化和释放资源。 + *

+ * + * @return Shiro生命周期Bean后处理器 + */ @Bean public static LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { return new LifecycleBeanPostProcessor(); } + /** + * 配置Shiro注解拦截器(授权属性源Advisor) + *

+ * 使Shiro的安全注解(如@RequiresRoles、@RequiresPermissions、@RequiresAuthentication等) + * 能够生效。该Advisor会拦截带有安全注解的方法,在方法执行前进行权限校验。 + *

+ * + * @param securityManager Shiro安全管理器,注解拦截器需要通过它获取当前用户的授权信息 + * @return 授权属性源Advisor实例 + */ @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) { AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); diff --git a/exam-api/src/main/java/com/bc/exam/config/SwaggerConfig.java b/exam-api/src/main/java/com/bc/exam/config/SwaggerConfig.java index 351aceb..5832451 100644 --- a/exam-api/src/main/java/com/bc/exam/config/SwaggerConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/SwaggerConfig.java @@ -21,7 +21,7 @@ import java.util.Collections; /** * @Description 描述:Swagger配置 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Configuration @EnableSwagger2 diff --git a/exam-api/src/main/java/com/bc/exam/config/TransactionAopConfig.java b/exam-api/src/main/java/com/bc/exam/config/TransactionAopConfig.java index 8002aae..4111c35 100644 --- a/exam-api/src/main/java/com/bc/exam/config/TransactionAopConfig.java +++ b/exam-api/src/main/java/com/bc/exam/config/TransactionAopConfig.java @@ -18,22 +18,46 @@ import java.util.Map; /** - * @Description 描述: + * 基于AOP的声明式事务管理配置类 + *

+ * 通过Spring AOP切面机制,自动为Service层的业务方法添加事务管理, + * 无需在每个方法上手动添加@Transactional注解。 + * 根据方法名前缀自动匹配事务规则: + * - 增删改操作(insert/add/create/up/set/remove/delete等)使用读写事务 + * - 查询操作(query/select/get/find等)使用只读事务,数据库可对只读操作进行性能优化 + *

+ * + * @Description 描述:* @Author A贾宇婷034244310 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Aspect @Configuration public class TransactionAopConfig { + /** Spring事务管理器,由Spring Boot自动配置注入 */ @Resource private PlatformTransactionManager transactionManager; + /** + * 定义事务切点表达式 + *

+ * 匹配com.bc.exam.modules包下所有子模块的service.impl包中所有类的所有方法, + * 即所有Service实现类的方法都会被事务拦截。 + *

+ * @return 切点表达式字符串 + */ @Pointcut("execution(* com.bc.exam.modules.*.service.impl.*.*(..))") public String transactionPoint(){ return "execution(* com.bc.exam.modules.*.service.impl.*.*(..))"; } /** * 事务管理配置 + *

+ * 根据方法名前缀定义两类事务规则: + * 1. 写操作(CUD):使用PROPAGATION_REQUIRED传播行为 + ISOLATION_READ_COMMITTED隔离级别 + 遇到Exception即回滚 + * 2. 读操作(R):使用PROPAGATION_SUPPORTS传播行为 + 只读模式,数据库可针对只读做优化 + *

+ * @return 配置完成的事务拦截器实例 */ @Bean("txAdvice") public TransactionInterceptor txAdvice() { @@ -84,6 +108,11 @@ public class TransactionAopConfig { /** * 设置切面规则,容器自动注入 + *

+ * 将事务拦截器(txAdvice)绑定到Service实现类的切点上, + * 使得符合切点表达式的方法在执行时自动被事务管理。 + *

+ * @return 配置完成的Advisor切面通知实例 */ @Bean public Advisor advisor() { diff --git a/exam-api/src/main/java/com/bc/exam/core/annon/Dict.java b/exam-api/src/main/java/com/bc/exam/core/annon/Dict.java index 9987329..90223d7 100644 --- a/exam-api/src/main/java/com/bc/exam/core/annon/Dict.java +++ b/exam-api/src/main/java/com/bc/exam/core/annon/Dict.java @@ -9,7 +9,7 @@ import java.lang.annotation.Target; /** * @Description 描述:数据字典注解 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/exam-api/src/main/java/com/bc/exam/core/api/ApiError.java b/exam-api/src/main/java/com/bc/exam/core/api/ApiError.java index 3a4f6f8..38cb8a8 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/ApiError.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/ApiError.java @@ -10,7 +10,7 @@ import java.io.Serializable; /** * @Description 描述:全局错误码定义,用于定义接口的响应数据,枚举名称全部使用代码命名,在系统中调用,免去取名难的问题。 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @NoArgsConstructor @AllArgsConstructor diff --git a/exam-api/src/main/java/com/bc/exam/core/api/ApiRest.java b/exam-api/src/main/java/com/bc/exam/core/api/ApiRest.java index 250ae43..e7e8f83 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/ApiRest.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/ApiRest.java @@ -9,44 +9,61 @@ import lombok.NoArgsConstructor; /** + * 统一API响应结果封装类 + *

+ * 所有Controller接口的返回值都使用此类进行统一包装,确保前后端交互的数据格式一致。 + * 响应结构包含三个核心字段: + * - code: 业务状态码,0表示成功,1表示失败 + * - msg: 响应消息描述 + * - data: 响应数据体,泛型T支持任意业务数据类型 + *

+ *

+ * 使用示例: + *

+ * // 成功响应
+ * return new ApiRest<>();  // 配合BaseController的success()方法使用
+ * // 异常响应
+ * return new ApiRest<>(serviceException);  // 从异常构造错误响应
+ * 
+ *

+ * @param 响应数据的泛型类型 + * * @Description 描述:数据结果返回的封装 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @NoArgsConstructor @ApiModel(value="接口响应", description="接口响应") public class ApiRest{ - /** - * 响应消息 - */ + /** 响应消息描述,用于向前端传达操作结果的文字说明 */ @ApiModelProperty(value = "响应消息") private String msg; /** - * 响应代码 + * 响应状态码 + *

0 = 操作成功,1 = 操作失败

*/ @ApiModelProperty(value = "响应代码,0为成功,1为失败", required = true) private Integer code; - /** - * 请求或响应body - */ + /** 响应数据体,承载具体的业务数据,类型为泛型以支持不同业务场景 */ @ApiModelProperty(value = "响应内容") protected T data; /** - * 是否成功 - * @return + * 判断当前响应是否为成功状态 + * @return true表示操作成功(code=0),false表示操作失败 */ public boolean isSuccess(){ return code.equals(0); } /** - * 构造函数 - * @param error + * 从ServiceException构造异常响应 + *

将业务异常的code和msg映射到响应对象中

+ * @param error 业务异常对象,包含错误码和错误信息 */ public ApiRest(ServiceException error){ this.code = error.getCode(); @@ -54,8 +71,9 @@ public class ApiRest{ } /** - * 构造函数 - * @param error + * 从ApiError构造异常响应 + *

将API错误枚举的code和msg映射到响应对象中

+ * @param error API错误枚举对象,包含错误码和错误信息 */ public ApiRest(ApiError error){ this.code = error.getCode(); diff --git a/exam-api/src/main/java/com/bc/exam/core/api/controller/BaseController.java b/exam-api/src/main/java/com/bc/exam/core/api/controller/BaseController.java index 67d32ff..2d2adb6 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/controller/BaseController.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/controller/BaseController.java @@ -7,32 +7,42 @@ import com.bc.exam.core.exception.ServiceException; /** + * 基础控制器 + *

+ * 所有业务Controller的公共基类,提供统一的响应构造方法, + * 封装success(成功)和failure(失败)两种响应模式及其多种重载形式, + * 使子类Controller只需调用简洁的方法即可返回规范化的ApiRest响应。 + *

+ *

+ * 响应状态约定: + * - code=0 表示操作成功 + * - code=1 表示操作失败 + *

+ * * @Description 描述:基础控制器 control复用这里公共的内容 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ public class BaseController { - /** - * 成功默认消息 - */ + /** 成功状态码 */ private static final Integer CODE_SUCCESS = 0; + /** 成功默认消息 */ private static final String MSG_SUCCESS = "操作成功!"; - /** - * 失败默认消息 - */ + /** 失败状态码 */ private static final Integer CODE_FAILURE = 1; + /** 失败默认消息 */ private static final String MSG_FAILURE = "请求失败!"; /** - * 完成消息构造 - * @param code - * @param message - * @param data - * @param - * @return + * 构造完整的响应消息(核心方法,其他方法均委托于此) + * @param code 响应状态码(0=成功,1=失败) + * @param message 响应消息描述 + * @param data 响应数据体,为null时不设置data字段 + * @param 响应数据的泛型类型 + * @return 构造完成的统一响应对象 */ protected ApiRest message(Integer code, String message, T data){ ApiRest response = new ApiRest<>(); @@ -45,9 +55,10 @@ public class BaseController { } /** - * 请求成功空数据 - * @param - * @return + * 请求成功 - 无数据响应 + *

用于不需要返回数据的操作,如删除、状态更新等

+ * @param 响应数据的泛型类型 + * @return 成功的空数据响应 */ protected ApiRest success(){ return message(0, "请求成功!", null); @@ -56,11 +67,11 @@ public class BaseController { /** - * 请求成功,通用代码 - * @param message - * @param data - * @param - * @return + * 请求成功 - 带自定义消息和数据 + * @param message 自定义成功消息 + * @param data 响应数据体 + * @param 响应数据的泛型类型 + * @return 包含自定义消息和数据的成功响应 */ protected ApiRest success(String message, T data){ return message(CODE_SUCCESS, message, data); @@ -68,10 +79,10 @@ public class BaseController { /** - * 请求成功,仅内容 - * @param data - * @param - * @return + * 请求成功 - 仅带数据(使用默认成功消息"操作成功!") + * @param data 响应数据体 + * @param 响应数据的泛型类型 + * @return 包含数据的成功响应 */ protected ApiRest success(T data){ return message(CODE_SUCCESS, MSG_SUCCESS, data); @@ -79,42 +90,42 @@ public class BaseController { /** - * 请求失败,完整构造 - * @param code - * @param message - * @param data - * @param - * @return + * 请求失败 - 完整构造(自定义状态码、消息和数据) + * @param code 自定义错误码 + * @param message 自定义错误消息 + * @param data 错误详情数据 + * @param 响应数据的泛型类型 + * @return 包含完整错误信息的失败响应 */ protected ApiRest failure(Integer code, String message, T data){ return message(code, message, data); } /** - * 请求失败,消息和内容 - * @param message - * @param data - * @param - * @return + * 请求失败 - 带消息和数据(使用默认失败状态码1) + * @param message 自定义错误消息 + * @param data 错误详情数据 + * @param 响应数据的泛型类型 + * @return 包含错误消息和数据的失败响应 */ protected ApiRest failure(String message, T data){ return message(CODE_FAILURE, message, data); } /** - * 请求失败,消息 - * @param message - * @return + * 请求失败 - 仅消息(使用默认失败状态码1,无数据) + * @param message 自定义错误消息 + * @return 仅包含错误消息的失败响应 */ protected ApiRest failure(String message){ return message(CODE_FAILURE, message, null); } /** - * 请求失败,仅内容 - * @param data - * @param - * @return + * 请求失败 - 仅数据(使用默认失败消息"请求失败!") + * @param data 错误详情数据 + * @param 响应数据的泛型类型 + * @return 包含错误数据的失败响应 */ protected ApiRest failure(T data){ return message(CODE_FAILURE, MSG_FAILURE, data); @@ -122,9 +133,9 @@ public class BaseController { /** - * 请求失败,仅内容 - * @param - * @return + * 请求失败 - 默认响应(使用默认状态码1和默认消息"请求失败!",无数据) + * @param 响应数据的泛型类型 + * @return 默认的失败响应 */ protected ApiRest failure(){ return message(CODE_FAILURE, MSG_FAILURE, null); @@ -133,9 +144,11 @@ public class BaseController { /** - * 请求失败,仅内容 - * @param - * @return + * 请求失败 - 从ApiError枚举构造响应 + * @param error API错误枚举,包含预定义的错误码和错误消息 + * @param data 错误详情数据 + * @param 响应数据的泛型类型 + * @return 基于ApiError枚举的失败响应 */ protected ApiRest failure(ApiError error, T data){ return message(error.getCode(), error.msg, data); @@ -144,10 +157,11 @@ public class BaseController { /** - * 请求失败,仅内容 - * @param ex - * @param - * @return + * 请求失败 - 从ServiceException构造响应 + *

将ServiceException中的错误码和错误信息映射到统一响应格式

+ * @param ex 业务异常对象,包含错误码和错误信息 + * @param 响应数据的泛型类型 + * @return 基于业务异常的失败响应 */ protected ApiRest failure(ServiceException ex){ ApiRest apiRest = message(ex.getCode(), ex.getMsg(), null); diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseDTO.java index a4fe0d2..7ff005d 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseDTO.java @@ -9,7 +9,7 @@ import java.io.Serializable; /** * @Description 描述:请求和响应的基础类,用于处理序列化 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data public class BaseDTO implements Serializable { diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdReqDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdReqDTO.java index 624cec1..e5bd36e 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdReqDTO.java @@ -9,7 +9,7 @@ import lombok.Data; /** * @Description 描述:主键通用请求类,用于根据ID查询 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @ApiModel(value="主键通用请求类", description="主键通用请求类") diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdRespDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdRespDTO.java index a8c7a77..3a6d59b 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdRespDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdRespDTO.java @@ -11,7 +11,7 @@ import lombok.NoArgsConstructor; /** * @Description 描述:主键通用响应类,用于添加后返回内容 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @ApiModel(value="主键通用响应类", description="主键通用响应类") diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdsReqDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdsReqDTO.java index 69d5cdc..c7a86f2 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdsReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseIdsReqDTO.java @@ -10,7 +10,7 @@ import java.util.List; /** * @Description 描述:通用ID列表类操作,用于批量删除、修改状态等 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @ApiModel(value="删除参数", description="删除参数") diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseStateReqDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseStateReqDTO.java index 4a5942e..41efeef 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseStateReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/BaseStateReqDTO.java @@ -12,7 +12,7 @@ import java.util.List; /** * @Description 描述:通用状态请求类,用于修改状态什么的 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @ApiModel(value="通用状态请求类", description="通用状态请求类") diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingReqDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingReqDTO.java index 5396334..ebbf86f 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingReqDTO.java @@ -9,7 +9,7 @@ import lombok.Data; /** * @Description 描述:分页查询类 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @ApiModel(value="分页参数", description="分页参数") @Data diff --git a/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingRespDTO.java b/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingRespDTO.java index 3f72b4c..3f4d237 100644 --- a/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingRespDTO.java +++ b/exam-api/src/main/java/com/bc/exam/core/api/dto/PagingRespDTO.java @@ -3,9 +3,9 @@ package com.bc.exam.core.api.dto; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; /** - * @Description 描述: - * @Author A贾宇婷034244310分页响应类 - * @Date 20260615 + * @Description 描述:分页响应类,继承MyBatis-Plus的Page,增强分页计算 + * @Author A贾宇婷034244310 + * @Date 20260616 */ public class PagingRespDTO extends Page { diff --git a/exam-api/src/main/java/com/bc/exam/core/enums/CommonState.java b/exam-api/src/main/java/com/bc/exam/core/enums/CommonState.java index 3202eab..6f81ec0 100644 --- a/exam-api/src/main/java/com/bc/exam/core/enums/CommonState.java +++ b/exam-api/src/main/java/com/bc/exam/core/enums/CommonState.java @@ -4,7 +4,7 @@ package com.bc.exam.core.enums; /** * @Description 描述:通用的状态枚举信息 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ public interface CommonState { diff --git a/exam-api/src/main/java/com/bc/exam/core/exception/ServiceException.java b/exam-api/src/main/java/com/bc/exam/core/exception/ServiceException.java index f03f12d..77d2ac3 100644 --- a/exam-api/src/main/java/com/bc/exam/core/exception/ServiceException.java +++ b/exam-api/src/main/java/com/bc/exam/core/exception/ServiceException.java @@ -9,7 +9,7 @@ import lombok.NoArgsConstructor; /** * @Description 描述:服务自定义异常 继承运行时异常 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @Data @AllArgsConstructor diff --git a/exam-api/src/main/java/com/bc/exam/core/exception/ServiceExceptionHandler.java b/exam-api/src/main/java/com/bc/exam/core/exception/ServiceExceptionHandler.java index 11f2d6a..db3b84c 100644 --- a/exam-api/src/main/java/com/bc/exam/core/exception/ServiceExceptionHandler.java +++ b/exam-api/src/main/java/com/bc/exam/core/exception/ServiceExceptionHandler.java @@ -7,16 +7,35 @@ import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.*; /** + * 全局异常处理器 + *

+ * 使用@RestControllerAdvice注解实现全局统一的异常捕获和处理, + * 确保所有Controller层抛出的异常都能被统一拦截并返回规范化的JSON响应。 + * 避免在每个Controller中重复编写try-catch代码,实现异常处理的集中化管理。 + *

+ *

+ * 处理机制: + * - @RestControllerAdvice = @ControllerAdvice + @ResponseBody, + * 异常处理结果自动序列化为JSON格式返回给前端 + * - @ExceptionHandler指定要捕获的异常类型及其处理方法 + * - @InitBinder和@ModelAttribute提供数据绑定和模型属性的全局预处理能力 + *

+ * * @Description 描述:统一异常处理类 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260616 */ @RestControllerAdvice public class ServiceExceptionHandler { /** - * 应用到所有@RequestMapping注解方法,在其执行之前初始化数据绑定器 - * @param binder + * 全局数据绑定器初始化 + *

+ * 应用到所有@RequestMapping注解方法,在其执行之前初始化数据绑定器。 + * 可用于注册自定义的属性编辑器(PropertyEditor)或类型转换器(Converter), + * 当前为空实现,预留扩展点。 + *

+ * @param binder WebDataBinder数据绑定器实例 */ @InitBinder public void initWebBinder(WebDataBinder binder){ @@ -24,8 +43,13 @@ public class ServiceExceptionHandler { } /** - * 把值绑定到Model中,使全局@RequestMapping可以获取到该值 - * @param model + * 全局模型属性绑定 + *

+ * 在每个@RequestMapping方法执行前调用,可向Model中添加公共属性, + * 使得所有Controller方法都能通过@ModelAttribute获取到这些值。 + * 当前为空实现,预留扩展点。 + *

+ * @param model Spring MVC的Model对象,用于存放视图共享数据 */ @ModelAttribute public void addAttribute(Model model) { @@ -33,13 +57,19 @@ public class ServiceExceptionHandler { } /** - * 捕获ServiceException - * @param e - * @return + * 统一捕获业务异常(ServiceException) + *

+ * 当Service层抛出ServiceException时,自动将异常中的错误码和错误信息 + * 封装为ApiRest统一响应格式返回给前端,HTTP状态码固定为200(OK), + * 通过ApiRest中的code字段区分业务成功/失败状态。 + *

+ * @param e 捕获到的业务异常对象,包含错误码(code)和错误信息(msg) + * @return 封装了异常信息的统一响应对象 */ @ExceptionHandler({com.bc.exam.core.exception.ServiceException.class}) @ResponseStatus(HttpStatus.OK) public ApiRest serviceExceptionHandler(ServiceException e) { + // 将异常中的错误码和错误消息构造为统一响应格式返回 return new ApiRest(e); } diff --git a/exam-api/src/main/java/com/bc/exam/core/utils/BeanMapper.java b/exam-api/src/main/java/com/bc/exam/core/utils/BeanMapper.java index 2b9ae54..d358b29 100644 --- a/exam-api/src/main/java/com/bc/exam/core/utils/BeanMapper.java +++ b/exam-api/src/main/java/com/bc/exam/core/utils/BeanMapper.java @@ -10,13 +10,9 @@ import java.util.stream.Collectors; /** - * 简单封装Dozer, 实现深度转换Bean<->Bean的Mapper.实现: - * - * 1. 持有Mapper的单例. - * 2. 返回值类型转换. - * 3. 批量转换Collection中的所有对象. - * 4. 区分创建新的B对象与将对象A值复制到已存在的B对象两种函数. - * + * @Description 描述:Bean对象映射工具类,基于Dozer实现深度属性拷贝与类型转换 + * @Author A贾宇婷034244310 + * @Date 20260615 */ public class BeanMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/Constant.java b/exam-api/src/main/java/com/bc/exam/modules/Constant.java index 7941f81..b344d49 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/Constant.java +++ b/exam-api/src/main/java/com/bc/exam/modules/Constant.java @@ -1,11 +1,15 @@ package com.bc.exam.modules; - +/** + * @Description 描述:全局常量定义,存储系统级配置常量 + * @Author C薛涵艺034244315 + * @Date 20260615 + */ public class Constant { /** - * 会话 + * 会话令牌常量Key */ public static final String TOKEN = "token"; } diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/controller/SysConfigController.java b/exam-api/src/main/java/com/bc/exam/modules/config/controller/SysConfigController.java index d2c2d52..161ed84 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/controller/SysConfigController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/controller/SysConfigController.java @@ -17,8 +17,8 @@ import org.springframework.web.bind.annotation.RestController; /** * @Description 描述:通用配置控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Api(tags={"系统配置"}) @RestController diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/dto/SysConfigDTO.java b/exam-api/src/main/java/com/bc/exam/modules/config/dto/SysConfigDTO.java index 443651d..79bb5dc 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/dto/SysConfigDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/dto/SysConfigDTO.java @@ -9,8 +9,8 @@ import java.io.Serializable; /** * @Description 描述:通用配置请求类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Data @ApiModel(value="系统配置", description="系统配置") diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/entity/SysConfig.java b/exam-api/src/main/java/com/bc/exam/modules/config/entity/SysConfig.java index af0faa2..1378520 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/entity/SysConfig.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/entity/SysConfig.java @@ -10,8 +10,8 @@ import lombok.Data; /** * @Description 描述:系统配置实体类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @TableName("sys_config") diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/mapper/SysConfigMapper.java b/exam-api/src/main/java/com/bc/exam/modules/config/mapper/SysConfigMapper.java index 0f36661..26a1f06 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/mapper/SysConfigMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/mapper/SysConfigMapper.java @@ -6,8 +6,8 @@ import com.bc.exam.modules.config.entity.SysConfig; /** * @Description 描述:系统配置Mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysConfigMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/service/SysConfigService.java b/exam-api/src/main/java/com/bc/exam/modules/config/service/SysConfigService.java index 2ee1a8a..f2a8a93 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/service/SysConfigService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/service/SysConfigService.java @@ -7,8 +7,8 @@ import com.bc.exam.modules.config.entity.SysConfig; /** * @Description 描述:系统配置接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface SysConfigService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/config/service/impl/SysConfigServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/config/service/impl/SysConfigServiceImpl.java index 0dc35d4..3fe3127 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/config/service/impl/SysConfigServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/config/service/impl/SysConfigServiceImpl.java @@ -12,8 +12,8 @@ import org.springframework.stereotype.Service; /** * @Description 描述:语言设置 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class SysConfigServiceImpl extends ServiceImpl implements SysConfigService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictDataController.java b/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictDataController.java index 6d9b1ee..a45f559 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictDataController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictDataController.java @@ -23,8 +23,8 @@ import javax.annotation.Resource; /** * @Description 描述:字典码值数据表 前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/sys/api/dict/data") diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictTypeController.java b/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictTypeController.java index 9321936..0881e50 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictTypeController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/controller/SysDictTypeController.java @@ -25,8 +25,8 @@ import java.util.stream.Collectors; /** * @Description 描述:字典 码值大类表 前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/sys/api/dict/type") diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictData.java b/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictData.java index 8acdd75..9914bf5 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictData.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictData.java @@ -14,8 +14,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:字典码值数据表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictType.java b/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictType.java index 176785f..a385380 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictType.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/entity/SysDictType.java @@ -13,8 +13,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:字典码值大类表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictDataMapper.java b/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictDataMapper.java index 07b9bb2..995aa18 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictDataMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictDataMapper.java @@ -12,8 +12,8 @@ import java.util.List; /** * @Description 描述:码值数据表 Mapper 接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysDictDataMapper extends BaseMapper { @Select("${sqlStr}") diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictTypeMapper.java b/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictTypeMapper.java index e1ffb8a..52dadb4 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictTypeMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/mapper/SysDictTypeMapper.java @@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description 描述:码值大类表 Mapper 接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysDictTypeMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictDataService.java b/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictDataService.java index 5d9ae0b..2212f2e 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictDataService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictDataService.java @@ -12,8 +12,8 @@ import java.util.Map; /** * @Description 描述:码值数据表 服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface SysDictDataService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictTypeService.java b/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictTypeService.java index 1a801ef..e14f1da 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictTypeService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/service/SysDictTypeService.java @@ -11,8 +11,8 @@ import java.util.function.Function; /** * @Description 描述:码值大类表 服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface SysDictTypeService extends IService { /** diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictDataServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictDataServiceImpl.java index 39b22e7..94e1b96 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictDataServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictDataServiceImpl.java @@ -22,8 +22,8 @@ import java.util.stream.Collectors; /** * @Description 描述:码值数据表 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class SysDictDataServiceImpl extends ServiceImpl implements SysDictDataService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictTypeServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictTypeServiceImpl.java index 671d180..6fd986c 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictTypeServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/dict/service/impl/SysDictTypeServiceImpl.java @@ -23,8 +23,8 @@ import java.util.function.Function; /** * @Description 描述:码值大类表 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class SysDictTypeServiceImpl extends ServiceImpl implements SysDictTypeService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/gonggao/controller/TGonggaoController.java b/exam-api/src/main/java/com/bc/exam/modules/gonggao/controller/TGonggaoController.java index 67e6fe0..6cc7cd0 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/gonggao/controller/TGonggaoController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/gonggao/controller/TGonggaoController.java @@ -18,8 +18,8 @@ import javax.annotation.Resource; /** * @Description 描述:公告表 前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/gonggao/gggl") diff --git a/exam-api/src/main/java/com/bc/exam/modules/gonggao/entity/TGonggao.java b/exam-api/src/main/java/com/bc/exam/modules/gonggao/entity/TGonggao.java index 2e381b3..8c44525 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/gonggao/entity/TGonggao.java +++ b/exam-api/src/main/java/com/bc/exam/modules/gonggao/entity/TGonggao.java @@ -8,8 +8,8 @@ import java.util.Date; /** * @Description 描述:公告表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/gonggao/mapper/TGonggaoMapper.java b/exam-api/src/main/java/com/bc/exam/modules/gonggao/mapper/TGonggaoMapper.java index 48680f5..118933e 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/gonggao/mapper/TGonggaoMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/gonggao/mapper/TGonggaoMapper.java @@ -5,8 +5,8 @@ import com.bc.exam.modules.gonggao.entity.TGonggao; /** * @Description 描述:公告表 Mapper 接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface TGonggaoMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/TGonggaoService.java b/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/TGonggaoService.java index 86aeab3..07b6da9 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/TGonggaoService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/TGonggaoService.java @@ -7,8 +7,8 @@ import com.bc.exam.modules.gonggao.entity.TGonggao; /** * @Description 描述:公告表 服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface TGonggaoService extends IService { IPage paging(PagingReqDTO reqDTO); diff --git a/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/impl/TGonggaoServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/impl/TGonggaoServiceImpl.java index 6168140..f44a63a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/impl/TGonggaoServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/gonggao/service/impl/TGonggaoServiceImpl.java @@ -15,8 +15,8 @@ import org.springframework.stereotype.Service; /** * @Description 描述:公告表 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class TGonggaoServiceImpl extends ServiceImpl implements TGonggaoService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/liuyan/controller/TLiuyanController.java b/exam-api/src/main/java/com/bc/exam/modules/liuyan/controller/TLiuyanController.java index 02063b5..ebf765c 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/liuyan/controller/TLiuyanController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/liuyan/controller/TLiuyanController.java @@ -19,8 +19,8 @@ import javax.annotation.Resource; /** * @Description 描述:留言信息表 前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/liuyan/lygl") diff --git a/exam-api/src/main/java/com/bc/exam/modules/liuyan/entity/TLiuyan.java b/exam-api/src/main/java/com/bc/exam/modules/liuyan/entity/TLiuyan.java index 81c3dbb..5006d69 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/liuyan/entity/TLiuyan.java +++ b/exam-api/src/main/java/com/bc/exam/modules/liuyan/entity/TLiuyan.java @@ -8,8 +8,8 @@ import java.util.Date; /** * @Description 描述:留言信息表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/liuyan/mapper/TLiuyanMapper.java b/exam-api/src/main/java/com/bc/exam/modules/liuyan/mapper/TLiuyanMapper.java index 7ec6baa..aef0058 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/liuyan/mapper/TLiuyanMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/liuyan/mapper/TLiuyanMapper.java @@ -5,8 +5,8 @@ import com.bc.exam.modules.liuyan.entity.TLiuyan; /** * @Description 描述:留言信息表 Mapper 接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface TLiuyanMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/TLiuyanService.java b/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/TLiuyanService.java index 43bdc5c..27415e8 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/TLiuyanService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/TLiuyanService.java @@ -7,8 +7,8 @@ import com.bc.exam.modules.liuyan.entity.TLiuyan; /** * @Description 描述:留言信息表 服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface TLiuyanService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/impl/TLiuyanServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/impl/TLiuyanServiceImpl.java index 739448e..325b96f 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/impl/TLiuyanServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/liuyan/service/impl/TLiuyanServiceImpl.java @@ -15,8 +15,8 @@ import org.springframework.stereotype.Service; /** * @Description 描述:留言信息表 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class TLiuyanServiceImpl extends ServiceImpl implements TLiuyanService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/student/controller/StudentController.java b/exam-api/src/main/java/com/bc/exam/modules/student/controller/StudentController.java index 94bcd28..f285e0c 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/student/controller/StudentController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/student/controller/StudentController.java @@ -15,8 +15,8 @@ import javax.annotation.Resource; /** * @Description 描述:学生基础信息 前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/student/student") diff --git a/exam-api/src/main/java/com/bc/exam/modules/student/entity/Student.java b/exam-api/src/main/java/com/bc/exam/modules/student/entity/Student.java index 3a6c6a4..3f26f4a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/student/entity/Student.java +++ b/exam-api/src/main/java/com/bc/exam/modules/student/entity/Student.java @@ -11,8 +11,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:学生基础信息 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/student/mapper/StudentMapper.java b/exam-api/src/main/java/com/bc/exam/modules/student/mapper/StudentMapper.java index dd381d2..0eae178 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/student/mapper/StudentMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/student/mapper/StudentMapper.java @@ -9,8 +9,8 @@ import org.apache.ibatis.annotations.Param; /** * @Description 描述:学生基础信息 Mapper 接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface StudentMapper extends BaseMapper { IPage paging(Page page, @Param("ew") Wrapper wrapper); diff --git a/exam-api/src/main/java/com/bc/exam/modules/student/service/StudentService.java b/exam-api/src/main/java/com/bc/exam/modules/student/service/StudentService.java index bf5b0ae..fe82b81 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/student/service/StudentService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/student/service/StudentService.java @@ -8,8 +8,8 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description 描述:学生基础信息 服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface StudentService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/student/service/impl/StudentServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/student/service/impl/StudentServiceImpl.java index 6b740c3..8ea888a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/student/service/impl/StudentServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/student/service/impl/StudentServiceImpl.java @@ -14,8 +14,8 @@ import org.springframework.stereotype.Service; /** * @Description 描述:学生基础信息 服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class StudentServiceImpl extends ServiceImpl implements StudentService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/system/mapper/SysDictMapper.java b/exam-api/src/main/java/com/bc/exam/modules/system/mapper/SysDictMapper.java index 2d2c8b9..a955b8d 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/system/mapper/SysDictMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/system/mapper/SysDictMapper.java @@ -5,8 +5,8 @@ import org.apache.ibatis.annotations.Param; /** * @Description 描述:机主信息Mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Mapper public interface SysDictMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/system/service/SysDictService.java b/exam-api/src/main/java/com/bc/exam/modules/system/service/SysDictService.java index e7576b6..0b8a98f 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/system/service/SysDictService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/system/service/SysDictService.java @@ -1,4 +1,10 @@ package com.bc.exam.modules.system.service; +/** + * @Description 描述:SysDictService 类 + * @Author C薛涵艺034244315 + * @Date 20260618 + */ + public interface SysDictService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/system/service/impl/SysDictServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/system/service/impl/SysDictServiceImpl.java index 8056856..22aca8e 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/system/service/impl/SysDictServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/system/service/impl/SysDictServiceImpl.java @@ -5,6 +5,12 @@ import com.bc.exam.modules.system.service.SysDictService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +/** + * @Description 描述:SysDictServiceImpl 类 + * @Author C薛涵艺034244315 + * @Date 20260618 + */ + @Service public class SysDictServiceImpl implements SysDictService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/controller/TJhxxbController.java b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/controller/TJhxxbController.java index 17ba0f6..4b6ada8 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/controller/TJhxxbController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/controller/TJhxxbController.java @@ -26,8 +26,8 @@ import java.util.Date; /** * @Description 描述:借还信息表前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/tjhxxb/controller") diff --git a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/entity/TJhxxb.java b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/entity/TJhxxb.java index 279ac08..e245a13 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/entity/TJhxxb.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/entity/TJhxxb.java @@ -11,8 +11,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:借还信息表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/mapper/TJhxxbMapper.java b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/mapper/TJhxxbMapper.java index 92ccb26..d9b7159 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/mapper/TJhxxbMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/mapper/TJhxxbMapper.java @@ -10,8 +10,8 @@ import org.apache.ibatis.annotations.Param; /** * @Description 描述:借还信息表mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface TJhxxbMapper extends BaseMapper { IPage paging(Page page, @Param("ew") Wrapper wrapper); diff --git a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/TJhxxbService.java b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/TJhxxbService.java index f41cbd5..5ce9953 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/TJhxxbService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/TJhxxbService.java @@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description 描述:借还信息表实现 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface TJhxxbService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/impl/TJhxxbServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/impl/TJhxxbServiceImpl.java index 3bac477..2cb27c1 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/impl/TJhxxbServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tjhxxb/service/impl/TJhxxbServiceImpl.java @@ -13,35 +13,50 @@ import org.springframework.stereotype.Service; /** * @Description 描述:借还信息表实现 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class TJhxxbServiceImpl extends ServiceImpl implements TJhxxbService { + /** + * 借还书记录分页查询 + *

查询当前用户的借阅/归还记录,支持按借还状态过滤,以及按关联书籍的ISBN/书名/作者/类型模糊搜索。 + * 查询使用自定义SQL(baseMapper.paging),涉及借还表(a)与书籍表(b)的关联查询。

+ * @param reqDTO 分页请求参数,包含当前用户ID、查询条件(借还状态、书籍信息等) + * @return 分页后的借还记录数据 + */ @Override public IPage paging(PagingReqDTO reqDTO) { - //创建分页对象 + // 创建分页对象,设置当前页码和每页条数 Page query = new Page<>(reqDTO.getCurrent(), reqDTO.getSize()); - //查询条件 + // 构建查询条件(使用表别名 a=借还表, b=书籍表) QueryWrapper wrapper = new QueryWrapper<>(); TJhxxb params = reqDTO.getParams(); + // 按借还记录ID精确查询 if(!StringUtils.isBlank(params.getId())){ wrapper.eq("a.id", params.getId()); } + // 按借还状态过滤(如:待归还、已归还、逾期等) if(!StringUtils.isBlank(params.getState())){ wrapper.eq("a.state", params.getState()); } + // 限制只查询当前登录用户的借阅记录(通过reqDTO中的userId获取) wrapper.eq("a.user_id", reqDTO.getUserId()); + // 以下条件基于关联的书籍表(b表)进行模糊搜索 + // 按ISBN书号模糊搜索 wrapper.like(!StringUtils.isBlank(params.getIsbn()),"b.isbn", params.getIsbn()); + // 按书名模糊搜索 wrapper.like(!StringUtils.isBlank(params.getBName()),"b.b_name", params.getBName()); + // 按作者名模糊搜索 wrapper.like(!StringUtils.isBlank(params.getBAuthor()),"b.b_author", params.getBAuthor()); + // 按书籍类型模糊搜索 wrapper.like(!StringUtils.isBlank(params.getBType()),"b.b_type", params.getBType()); - //获得数据 + // 调用自定义Mapper方法执行关联查询(借还表JOIN书籍表),获得分页数据 IPage page = baseMapper.paging(query, wrapper); return page; } diff --git a/exam-api/src/main/java/com/bc/exam/modules/tlog/controller/TLogController.java b/exam-api/src/main/java/com/bc/exam/modules/tlog/controller/TLogController.java index 6154465..666ed5a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tlog/controller/TLogController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tlog/controller/TLogController.java @@ -18,8 +18,8 @@ import javax.annotation.Resource; /** * @Description 描述:书籍借还日志记录前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/tlog/logcontrol") diff --git a/exam-api/src/main/java/com/bc/exam/modules/tlog/entity/TLog.java b/exam-api/src/main/java/com/bc/exam/modules/tlog/entity/TLog.java index 05ec536..5ec1c72 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tlog/entity/TLog.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tlog/entity/TLog.java @@ -7,8 +7,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:借还日志 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/tlog/mapper/TLogMapper.java b/exam-api/src/main/java/com/bc/exam/modules/tlog/mapper/TLogMapper.java index 204b406..a549e13 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tlog/mapper/TLogMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tlog/mapper/TLogMapper.java @@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description 描述:借还日志接口 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface TLogMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tlog/service/TLogService.java b/exam-api/src/main/java/com/bc/exam/modules/tlog/service/TLogService.java index 3e56dd3..90482fe 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tlog/service/TLogService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tlog/service/TLogService.java @@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description 描述:借还日志服务类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface TLogService extends IService { IPage paging(PagingReqDTO reqDTO); diff --git a/exam-api/src/main/java/com/bc/exam/modules/tlog/service/impl/TLogServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/tlog/service/impl/TLogServiceImpl.java index dfebb64..a42a86e 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tlog/service/impl/TLogServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tlog/service/impl/TLogServiceImpl.java @@ -13,8 +13,8 @@ import org.springframework.stereotype.Service; /** * @Description 描述:借还日志服务 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class TLogServiceImpl extends ServiceImpl implements TLogService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/controller/TSjxxbController.java b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/controller/TSjxxbController.java index aab869d..4c8ee50 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/controller/TSjxxbController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/controller/TSjxxbController.java @@ -18,8 +18,8 @@ import javax.annotation.Resource; /** * @Description 描述:书籍信息表前端控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @RestController @RequestMapping("/tsjxxb/controller") diff --git a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/entity/TSjxxb.java b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/entity/TSjxxb.java index fde7800..3884489 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/entity/TSjxxb.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/entity/TSjxxb.java @@ -11,8 +11,8 @@ import lombok.EqualsAndHashCode; /** * @Description 描述:书籍信息表 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @EqualsAndHashCode(callSuper = false) diff --git a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/mapper/TSjxxbMapper.java b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/mapper/TSjxxbMapper.java index ba010d2..3480ef7 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/mapper/TSjxxbMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/mapper/TSjxxbMapper.java @@ -5,8 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** * @Description 描述:书籍信息表mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface TSjxxbMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/TSjxxbService.java b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/TSjxxbService.java index b83cee9..5805b6a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/TSjxxbService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/TSjxxbService.java @@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.extension.service.IService; /** * @Description 描述:书籍信息表服务 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260619 */ public interface TSjxxbService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/impl/TSjxxbServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/impl/TSjxxbServiceImpl.java index 74e8564..85dbdbf 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/impl/TSjxxbServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/tsjxxb/service/impl/TSjxxbServiceImpl.java @@ -13,34 +13,46 @@ import org.springframework.stereotype.Service; /** * @Description 描述:书籍信息表服务实现类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260620 */ @Service public class TSjxxbServiceImpl extends ServiceImpl implements TSjxxbService { + /** + * 书籍信息分页查询 + *

支持多条件组合查询:按ID精确查询、按书籍类型筛选,以及按ISBN/书名/作者模糊搜索,按状态过滤

+ * @param reqDTO 分页请求参数,包含当前页码、每页大小及查询条件 + * @return 分页后的书籍信息数据 + */ @Override public IPage paging(PagingReqDTO reqDTO) { - //创建分页对象 + // 创建分页对象,设置当前页码和每页条数 Page query = new Page<>(reqDTO.getCurrent(), reqDTO.getSize()); - //查询条件 + // 构建查询条件 QueryWrapper wrapper = new QueryWrapper<>(); TSjxxb params = reqDTO.getParams(); + // 按书籍ID精确查询 if(!StringUtils.isBlank(params.getId())){ wrapper.eq("id", params.getId()); } + // 按书籍类型精确筛选(如教材、参考书等) if(!StringUtils.isBlank(params.getBType())){ wrapper.eq("b_type", params.getBType()); } + // 按ISBN书号模糊搜索 wrapper.like(!StringUtils.isBlank(params.getIsbn()),"isbn", params.getIsbn());//书号 + // 按书名模糊搜索 wrapper.like(!StringUtils.isBlank(params.getBName()),"b_name", params.getBName());//书名 + // 按作者名模糊搜索 wrapper.like(!StringUtils.isBlank(params.getBAuthor()),"b_author", params.getBAuthor());//作者 + // 按书籍状态过滤(如在馆/借出/损坏等) wrapper.like(!(null== params.getBState()),"b_state", params.getBState());//状态 - //获得数据 + // 执行分页查询,获得数据 IPage page = this.page(query, wrapper); return page; } diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/UserUtils.java b/exam-api/src/main/java/com/bc/exam/modules/user/UserUtils.java index fdbaa2e..d72ea6a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/UserUtils.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/UserUtils.java @@ -6,32 +6,58 @@ import com.bc.exam.modules.user.dto.response.SysUserLoginDTO; import org.apache.shiro.SecurityUtils; /** + * 用户工具类 + *

+ * 提供与当前登录用户相关的静态工具方法,封装Shiro安全框架的用户信息获取逻辑。 + * 所有方法均为静态方法,可在任意位置直接调用,无需注入。 + *

+ *

+ * 核心功能:从Shiro的SecurityContext中获取当前登录用户的ID, + * 支持两种模式:抛异常模式(默认)和静默模式(返回null)。 + *

+ * * @Description 描述:用户静态工具类 * @Author A贾宇婷034244310 - * @Date 20260615 + * @Date 20260618 */ public class UserUtils { /** * 获取当前登录用户的ID - * @param throwable - * @return + *

+ * 从Shiro安全框架的Subject中获取当前登录用户的Principal信息, + * 提取用户ID返回。支持通过throwable参数控制未登录时的行为: + * - throwable=true: 未登录时抛出ServiceException(错误码ApiError.ERROR_10010002) + * - throwable=false: 未登录时静默返回null + *

+ * @param throwable 是否在获取失败时抛出异常,true=抛异常,false=返回null + * @return 当前登录用户的ID字符串,获取失败且throwable=false时返回null + * @throws ServiceException 获取失败且throwable=true时抛出用户未登录异常 */ public static String getUserId(boolean throwable){ try { + // 从Shiro的Subject中获取当前登录用户信息(Principal),转换为SysUserLoginDTO后提取ID return ((SysUserLoginDTO) SecurityUtils.getSubject().getPrincipal()).getId(); }catch (Exception e){ + // 获取用户信息失败(通常是因为用户未登录或会话已过期) if(throwable){ + // 需要抛异常模式:抛出用户未登录的业务异常 throw new ServiceException(ApiError.ERROR_10010002); } + // 静默模式:返回null,由调用方自行处理 return null; } } /** - * 获取当前登录用户的ID,默认是会抛异常的 - * @return + * 获取当前登录用户的ID(默认抛异常模式) + *

+ * 便捷方法,等同于getUserId(true)。 + * 适用于必须登录才能访问的接口,未登录时直接抛出异常中断请求。 + *

+ * @return 当前登录用户的ID字符串 + * @throws ServiceException 用户未登录或会话过期时抛出异常 */ public static String getUserId(){ return getUserId(true); diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysRoleController.java b/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysRoleController.java index 2c250a7..efb9acc 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysRoleController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysRoleController.java @@ -21,8 +21,8 @@ import java.util.List; /** * @Description 描述:用户角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Api(tags = {"管理用户"}) @RestController diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysUserController.java b/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysUserController.java index 34f53e8..688dd48 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysUserController.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/controller/SysUserController.java @@ -23,8 +23,8 @@ import java.util.List; /** * @Description 描述:管理用户控制器 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Api(tags = {"管理用户"}) @RestController diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysRoleDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysRoleDTO.java index 0e6e732..eab9ee1 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysRoleDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysRoleDTO.java @@ -8,8 +8,8 @@ import java.io.Serializable; /** * @Description 描述:角色类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="角色", description="角色") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserDTO.java index b305181..2fe62a3 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserDTO.java @@ -9,8 +9,8 @@ import java.util.Date; /** * @Description 描述:管理用户 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="管理用户", description="管理用户") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserRoleDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserRoleDTO.java index fdc32c9..65c6725 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserRoleDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/SysUserRoleDTO.java @@ -8,8 +8,8 @@ import java.io.Serializable; /** * @Description 描述:用户角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="用户角色", description="用户角色") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserLoginReqDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserLoginReqDTO.java index cde1186..3df46ca 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserLoginReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserLoginReqDTO.java @@ -8,8 +8,8 @@ import java.io.Serializable; /** * @Description 描述:登录请求 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="管理员登录请求类", description="管理员登录请求类") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserSaveReqDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserSaveReqDTO.java index e44acc7..5c8e03e 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserSaveReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserSaveReqDTO.java @@ -9,8 +9,8 @@ import java.util.List; /** * @Description 描述:登录信息保存 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="管理员保存请求类", description="管理员保存请求类") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserTokenReqDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserTokenReqDTO.java index 5cc7537..6d83a23 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserTokenReqDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/request/SysUserTokenReqDTO.java @@ -8,8 +8,8 @@ import java.io.Serializable; /** * @Description 描述:请求token - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="会话检查请求类", description="会话检查请求类") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/dto/response/SysUserLoginDTO.java b/exam-api/src/main/java/com/bc/exam/modules/user/dto/response/SysUserLoginDTO.java index 4acc2ba..55901cb 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/dto/response/SysUserLoginDTO.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/dto/response/SysUserLoginDTO.java @@ -12,8 +12,8 @@ import java.util.Map; /** * @Description 描述:管理用户登录响应类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Data @ApiModel(value="管理用户登录响应类", description="管理用户登录响应类") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysRole.java b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysRole.java index 2e55639..f7e6ce4 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysRole.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysRole.java @@ -9,8 +9,8 @@ import lombok.Data; /** * @Description 描述:角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @TableName("sys_role") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUser.java b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUser.java index cc6235c..df8155d 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUser.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUser.java @@ -11,8 +11,8 @@ import java.util.Date; /** * @Description 描述:用户类 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @TableName("sys_user") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUserRole.java b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUserRole.java index 93564d8..d8c8ba0 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUserRole.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/entity/SysUserRole.java @@ -9,8 +9,8 @@ import lombok.Data; /** * @Description 描述:用户角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ @Data @TableName("sys_user_role") diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysRoleMapper.java b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysRoleMapper.java index 6358520..49be22b 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysRoleMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysRoleMapper.java @@ -4,8 +4,8 @@ import com.bc.exam.modules.user.entity.SysRole; /** * @Description 描述:角色Mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysRoleMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserMapper.java b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserMapper.java index 1a4c1a9..c34586a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserMapper.java @@ -5,8 +5,8 @@ import com.bc.exam.modules.user.entity.SysUser; /** * @Description 描述:管理用户Mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysUserMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserRoleMapper.java b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserRoleMapper.java index a72be36..3491062 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserRoleMapper.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/mapper/SysUserRoleMapper.java @@ -5,8 +5,8 @@ import com.bc.exam.modules.user.entity.SysUserRole; /** * @Description 描述:用户角色Mapper - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author B吉柯梦034244314 + * @Date 20260617 */ public interface SysUserRoleMapper extends BaseMapper { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysRoleService.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysRoleService.java index 00b5f4a..89ca0c9 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysRoleService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysRoleService.java @@ -8,8 +8,8 @@ import com.bc.exam.modules.user.entity.SysRole; /** * @Description 描述:角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ public interface SysRoleService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserRoleService.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserRoleService.java index cd8b978..bed78b7 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserRoleService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserRoleService.java @@ -10,8 +10,8 @@ import java.util.List; /** * @Description 描述:用户角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ public interface SysUserRoleService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserService.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserService.java index bc1fa3c..41bf250 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserService.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/SysUserService.java @@ -12,8 +12,8 @@ import java.util.List; /** * @Description 描述:管理用户 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ public interface SysUserService extends IService { diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysRoleServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysRoleServiceImpl.java index 08f54c2..1af6d5a 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysRoleServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysRoleServiceImpl.java @@ -15,24 +15,30 @@ import org.springframework.stereotype.Service; /** * @Description 描述:系统角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Service public class SysRoleServiceImpl extends ServiceImpl implements SysRoleService { + /** + * 角色分页查询 + *

查询系统中所有角色的分页列表,当前无条件过滤(全量分页)

+ * @param reqDTO 分页请求参数,包含当前页码和每页大小 + * @return 分页后的角色DTO数据 + */ @Override public IPage paging(PagingReqDTO reqDTO) { - //创建分页对象 + // 创建分页对象,设置当前页码和每页条数 IPage query = new Page<>(reqDTO.getCurrent(), reqDTO.getSize()); - //查询条件 + // 构建查询条件(当前为无条件查询,即查询所有角色) QueryWrapper wrapper = new QueryWrapper<>(); - //获得数据 + // 执行分页查询,获得数据 IPage page = this.page(query, wrapper); - //转换结果 + // 将实体对象转换为DTO对象返回(通过JSON序列化/反序列化实现深拷贝) IPage pageData = JSON.parseObject(JSON.toJSONString(page), new TypeReference>(){}); return pageData; } diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserRoleServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserRoleServiceImpl.java index a11e218..8406bc8 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserRoleServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserRoleServiceImpl.java @@ -20,35 +20,48 @@ import java.util.List; /** * @Description 描述:用户角色 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Service public class SysUserRoleServiceImpl extends ServiceImpl implements SysUserRoleService { + /** + * 用户角色关联关系分页查询 + * @param reqDTO 分页请求参数,包含当前页码和每页大小 + * @return 分页后的用户角色关联DTO数据 + */ @Override public IPage paging(PagingReqDTO reqDTO) { - //创建分页对象 + // 创建分页对象,设置当前页码和每页条数 IPage query = new Page<>(reqDTO.getCurrent(), reqDTO.getSize()); - //查询条件 + // 构建查询条件(当前为无条件查询,即查询所有用户角色关联记录) QueryWrapper wrapper = new QueryWrapper<>(); - //获得数据 + // 执行分页查询,获得数据 IPage page = this.page(query, wrapper); - //转换结果 + // 将实体对象转换为DTO对象返回(通过JSON序列化/反序列化实现深拷贝) IPage pageData = JSON.parseObject(JSON.toJSONString(page), new TypeReference>(){}); return pageData; } + /** + * 查询指定用户拥有的所有角色标识 + *

根据用户ID查询用户角色关联表,提取所有角色ID列表,用于登录时返回角色信息和权限判断

+ * @param userId 用户ID + * @return 该用户拥有的角色ID列表(如 ["student", "teacher"]) + */ @Override public List listRoles(String userId) { + // 根据用户ID精确查询所有角色关联记录 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUserRole::getUserId, userId); List list = this.list(wrapper); + // 遍历关联记录,提取角色ID组成列表返回 List roles = new ArrayList<>(); if(!CollectionUtils.isEmpty(list)){ for(SysUserRole item: list){ @@ -59,25 +72,36 @@ public class SysUserRoleServiceImpl extends ServiceImpl采用"先删除全部旧角色、再批量插入新角色"的方式实现角色重新分配。 + * 同时将角色ID拼接为逗号分隔的字符串返回,供冗余存储到用户表。

+ * @param userId 用户ID + * @param ids 需要分配的角色ID列表 + * @return 逗号分隔的角色ID字符串(如 "student,teacher"),若列表为空则返回空字符串 + */ @Override public String saveRoles(String userId, List ids) { - // 删除全部角色 + // 第一步:删除该用户的所有旧角色关联记录(全量清除) QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUserRole::getUserId, userId); this.remove(wrapper); + // 第二步:如果有新的角色需要分配,则批量插入新的关联记录 if(!CollectionUtils.isEmpty(ids)){ List list = new ArrayList<>(); String roleIds = null; + // 遍历角色ID列表,逐一构建关联实体 for(String item: ids){ SysUserRole role = new SysUserRole(); role.setRoleId(item); role.setUserId(userId); list.add(role); + // 拼接逗号分隔的角色ID字符串(用于冗余存储到用户表的roleIds字段) if(StringUtils.isEmpty(roleIds)){ roleIds = item; }else{ @@ -85,17 +109,24 @@ public class SysUserRoleServiceImpl extends ServiceImpl wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUserRole::getUserId, userId) .eq(SysUserRole::getRoleId, "student"); @@ -103,9 +134,14 @@ public class SysUserRoleServiceImpl extends ServiceImpl 0; } + /** + * 判断用户是否拥有教师角色 + * @param userId 用户ID + * @return true-是教师角色,false-不是教师角色 + */ @Override public boolean isTeacher(String userId) { - // 学生角色 + // 查询该用户是否关联了"teacher"角色 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUserRole::getUserId, userId) .eq(SysUserRole::getRoleId, "teacher"); @@ -113,9 +149,14 @@ public class SysUserRoleServiceImpl extends ServiceImpl 0; } + /** + * 判断用户是否拥有管理员角色 + * @param userId 用户ID + * @return true-是管理员角色,false-不是管理员角色 + */ @Override public boolean isAdmin(String userId) { - // 学生角色 + // 查询该用户是否关联了"sa"(系统管理员)角色 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUserRole::getUserId, userId) .eq(SysUserRole::getRoleId, "sa"); diff --git a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserServiceImpl.java b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserServiceImpl.java index f3160de..8e0a307 100644 --- a/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserServiceImpl.java +++ b/exam-api/src/main/java/com/bc/exam/modules/user/service/impl/SysUserServiceImpl.java @@ -37,8 +37,8 @@ import java.util.List; /** * @Description 描述:用户 - * @Author A贾宇婷034244310 - * @Date 20260615 + * @Author C薛涵艺034244315 + * @Date 20260618 */ @Service public class SysUserServiceImpl extends ServiceImpl implements SysUserService { @@ -49,215 +49,302 @@ public class SysUserServiceImpl extends ServiceImpl impl @Resource private SysDictDataService dictDataService; + /** + * 用户分页查询 + * @param reqDTO 分页请求参数,包含当前页码、每页大小及查询条件(用户名、真实姓名) + * @return 分页后的用户DTO数据 + */ @Override public IPage paging(PagingReqDTO reqDTO) { - //创建分页对象 + // 创建分页对象,设置当前页码和每页条数 IPage query = new Page<>(reqDTO.getCurrent(), reqDTO.getSize()); - //查询条件 + // 构建查询条件 QueryWrapper wrapper = new QueryWrapper<>(); SysUserDTO params = reqDTO.getParams(); + // 根据传入的查询参数动态拼接查询条件(模糊匹配) if(params!=null){ + // 按用户名模糊查询 if(!StringUtils.isBlank(params.getUserName())){ wrapper.lambda().like(SysUser::getUserName, params.getUserName()); } + // 按真实姓名模糊查询 if(!StringUtils.isBlank(params.getRealName())){ wrapper.lambda().like(SysUser::getRealName, params.getRealName()); } } - //获得数据 + // 执行分页查询,获得数据 IPage page = this.page(query, wrapper); - //转换结果 + // 将实体对象转换为DTO对象返回(通过JSON序列化/反序列化实现深拷贝) IPage pageData = JSON.parseObject(JSON.toJSONString(page), new TypeReference>(){}); return pageData; } + /** + * 用户登录 + *

登录流程:1.根据用户名查询用户 -> 2.校验账号状态 -> 3.验证密码 -> 4.生成Token -> 5.加载字典数据

+ * @param userName 用户名(登录账号) + * @param password 明文密码(前端传入) + * @return 登录成功后的响应DTO,包含Token、角色列表和字典数据 + * @throws ServiceException 用户不存在/账号被禁用/密码错误时抛出对应异常 + */ @Override public SysUserLoginDTO login(String userName, String password) { + // 第一步:根据用户名精确查询用户记录 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUser::getUserName, userName); SysUser user = this.getOne(wrapper, false); + // 用户不存在,抛出"用户不存在"异常 if(user == null){ throw new ServiceException(ApiError.ERROR_90010001); } - // 被禁用 + // 第二步:校验账号状态,被禁用的账号不允许登录 if(user.getState().equals(CommonState.ABNORMAL)){ throw new ServiceException(ApiError.ERROR_90010005); } + // 第三步:使用盐值+密文校验密码是否匹配(PassHandler内部进行加盐哈希比对) boolean check = PassHandler.checkPass(password,user.getSalt(), user.getPassword()); if(!check){ throw new ServiceException(ApiError.ERROR_90010002); } + // 第四步:密码验证通过,生成JWT Token并填充角色信息 SysUserLoginDTO ret = this.setToken(user); + // 第五步:加载系统所有有效的字典数据,供前端下拉框等组件使用 ret.setCodeMap(dictDataService.getAllEffectDicData()); return ret; } + /** + * Token验证与会话刷新 + *

用于前端携带Token访问接口时,验证Token有效性并刷新会话信息

+ * @param token 前端请求头中携带的JWT Token + * @return 验证通过后返回新的登录DTO(包含刷新后的Token和角色信息) + * @throws ServiceException Token无效或用户不存在/被禁用时抛出异常 + */ @Override public SysUserLoginDTO token(String token) { - // 获得会话 + // 从JWT Token中解析出用户名 String username = JwtUtils.getUsername(token); - // 校验结果 + // 校验Token签名是否合法(验证Token未被篡改且未过期) boolean check = JwtUtils.verify(token, username); + // Token校验失败,抛出"用户不存在"异常(提示前端重新登录) if(!check){ throw new ServiceException(ApiError.ERROR_90010001); } + // Token合法,根据用户名查询用户信息 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUser::getUserName, username); SysUser user = this.getOne(wrapper, false); + // 用户已被删除或不存在 if(user == null){ throw new ServiceException(ApiError.ERROR_10010002); } - // 被禁用 + // 校验账号状态,被禁用的账号拒绝刷新会话 if(user.getState().equals(CommonState.ABNORMAL)){ throw new ServiceException(ApiError.ERROR_90010005); } + // 验证通过,重新生成Token并返回(实现Token续期) return this.setToken(user); } + /** + * 用户登出 + *

仅清除当前Shiro会话,不做数据库层面的Token失效处理(JWT无状态特性)

+ * @param token 当前用户的Token(保留参数,暂未使用) + */ @Override public void logout(String token) { - // 仅退出当前会话 + // 仅退出当前Shiro会话,清除认证状态 SecurityUtils.getSubject().logout(); } + /** + * 更新当前登录用户的密码 + *

仅当请求中包含新密码时才执行修改操作,使用当前登录用户ID定位记录

+ * @param reqDTO 用户信息DTO,其中password字段为新密码(明文),为空则不做修改 + */ @Override public void update(SysUserDTO reqDTO) { String pass = reqDTO.getPassword(); + // 仅当密码字段不为空时才执行密码修改 if(!StringUtils.isBlank(pass)){ + // 对新密码进行加盐哈希处理,生成密文和盐值 PassInfo passInfo = PassHandler.buildPassword(pass); + // 根据当前登录用户ID查询用户记录 SysUser user = this.getById(UserUtils.getUserId()); + // 更新加密后的密码和盐值 user.setPassword(passInfo.getPassword()); user.setSalt(passInfo.getSalt()); this.updateById(user); } } + /** + * 保存用户信息(新增或修改) + *

包含用户基本信息和角色关联的保存,整个操作在事务中执行。 + * 新增时自动生成雪花ID,修改密码时对密码加盐加密。

+ * @param reqDTO 用户保存请求DTO,包含用户基本信息和角色ID列表 + * @throws ServiceException 未分配角色时抛出异常 + */ @Transactional(rollbackFor = Exception.class) @Override public void save(SysUserSaveReqDTO reqDTO) { List roles = reqDTO.getRoles(); + // 校验:用户必须至少分配一个角色 if(CollectionUtils.isEmpty(roles)){ throw new ServiceException(ApiError.ERROR_90010003); } - // 保存基本信息 + // 第一步:将请求DTO中的基本信息拷贝到用户实体对象 SysUser user = new SysUser(); BeanMapper.copy(reqDTO, user); - // 添加模式 + // 第二步:判断是新增还是修改模式 if(StringUtils.isBlank(user.getId())){ + // 新增模式:使用MyBatis-Plus的雪花算法生成全局唯一ID user.setId(IdWorker.getIdStr()); } - // 修改密码 + // 第三步:如果传入了新密码,则进行加盐加密处理 if(!StringUtils.isBlank(reqDTO.getPassword())){ PassInfo pass = PassHandler.buildPassword(reqDTO.getPassword()); user.setPassword(pass.getPassword()); user.setSalt(pass.getSalt()); } - // 保存角色信息 + // 第四步:保存用户与角色的关联关系,并返回逗号拼接的角色ID字符串 String roleIds = sysUserRoleService.saveRoles(user.getId(), roles); + // 将角色ID字符串冗余存储到用户表(便于快速查询和展示) user.setRoleIds(roleIds); + // 第五步:执行新增或更新用户记录(MyBatis-Plus根据ID是否存在自动判断insert/update) this.saveOrUpdate(user); } + /** + * 用户自主注册 + *

注册流程:1.检查用户名唯一性 -> 2.创建用户并加密密码 -> 3.默认分配"student"角色 -> 4.自动登录返回Token

+ * @param reqDTO 注册请求DTO,包含用户名、真实姓名和密码 + * @return 注册成功后自动登录的响应DTO(包含Token) + * @throws ServiceException 用户名已存在时抛出异常 + */ @Transactional(rollbackFor = Exception.class) @Override public SysUserLoginDTO reg(SysUserDTO reqDTO) { + // 第一步:检查用户名是否已被占用 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUser::getUserName, reqDTO.getUserName()); int count = this.count(wrapper); + // 用户名已存在,提示用户更换 if(count > 0){ throw new ServiceException(1, "用户名已存在,换一个吧!"); } - // 保存用户 + // 第二步:创建新用户实体,设置基本信息 SysUser user = new SysUser(); user.setId(IdWorker.getIdStr()); user.setUserName(reqDTO.getUserName()); user.setRealName(reqDTO.getRealName()); + // 对用户密码进行加盐加密处理后存储 PassInfo passInfo = PassHandler.buildPassword(reqDTO.getPassword()); user.setPassword(passInfo.getPassword()); user.setSalt(passInfo.getSalt()); - // 保存角色 + // 第三步:为新注册用户默认分配"student"(学生)角色 List roles = new ArrayList<>(); roles.add("student"); String roleIds = sysUserRoleService.saveRoles(user.getId(), roles); + // 将角色ID冗余存储到用户表 user.setRoleIds(roleIds); this.save(user); + // 第四步:注册成功后自动登录,生成Token返回 return this.setToken(user); } + /** + * 快速注册(存在即登录,不存在则注册后登录) + *

适用于第三方快捷登录场景:先检查用户名是否已存在,已存在则直接登录,不存在则走注册流程

+ * @param reqDTO 注册/登录请求DTO + * @return 登录响应DTO(包含Token和角色信息) + */ @Override public SysUserLoginDTO quickReg(SysUserDTO reqDTO) { + // 根据用户名查询是否已有该用户 QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().eq(SysUser::getUserName, reqDTO.getUserName()); wrapper.last(" LIMIT 1 "); SysUser user = this.getOne(wrapper); + // 用户已存在,直接生成Token返回(快速登录) if(user!=null){ return this.setToken(user); } + // 用户不存在,调用注册方法完成注册并自动登录 return this.reg(reqDTO); } /** - * 保存会话信息 - * @param user - * @return + * 生成登录会话信息(Token + 角色) + *

核心方法:为登录/注册/Token刷新场景统一生成JWT Token,并查询该用户的所有角色标识

+ * @param user 当前登录的用户实体 + * @return 登录响应DTO,包含Token字符串、用户基本信息和角色列表 */ private SysUserLoginDTO setToken(SysUser user){ + // 将用户实体的基本属性拷贝到响应DTO中 SysUserLoginDTO respDTO = new SysUserLoginDTO(); BeanMapper.copy(user, respDTO); - // 生成Token + // 基于用户名生成JWT签名Token(Token有效期由JwtUtils内部配置控制) String token = JwtUtils.sign(user.getUserName()); respDTO.setToken(token); System.out.println(token); - // 填充角色 + // 查询该用户拥有的所有角色标识列表(如 student, teacher, sa) List roles = sysUserRoleService.listRoles(user.getId()); respDTO.setRoles(roles); return respDTO; } + /** + * 查询所有具有教师相关角色的用户列表 + *

通过模糊匹配roleIds字段中包含"ca"的记录,筛选出教师/教务类用户

+ * @return 符合条件的用户DTO列表 + */ @Override public List queryAll() { + // 模糊查询角色ID中包含"ca"关键字的用户(匹配teacher/教务相关角色) QueryWrapper wrapper = new QueryWrapper<>(); wrapper.lambda().like(SysUser::getRoleIds, "ca"); + // 查询结果并转换为DTO列表返回 return JSON.parseObject(JSON.toJSONString(baseMapper.selectList(wrapper)), new TypeReference>() {}); } diff --git a/exam-api/src/main/resources/application.yml b/exam-api/src/main/resources/application.yml index 8ac73bc..4e8a6bf 100644 --- a/exam-api/src/main/resources/application.yml +++ b/exam-api/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: application: - name: chdbs + name: myzs profiles: active: dev main: diff --git a/logs/chdbs/spring.log b/logs/chdbs/spring.log index 28cd83b..ea5c40b 100644 --- a/logs/chdbs/spring.log +++ b/logs/chdbs/spring.log @@ -278,3 +278,314 @@ 2026-06-18 01:39:33.166 INFO 18112 --- [Thread-10] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' 2026-06-18 01:39:33.168 INFO 18112 --- [Thread-10] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closing ... 2026-06-18 01:39:33.168 INFO 18112 --- [Thread-10] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed +2026-06-18 21:40:48.576 INFO 16624 --- [main] com.bc.exam.ExamApplication : Starting ExamApplication on yx with PID 16624 (D:\git\exam-jyt\exam-api\target\classes started by 75514 in D:\git\exam-jyt) +2026-06-18 21:40:48.577 INFO 16624 --- [main] com.bc.exam.ExamApplication : The following profiles are active: dev +2026-06-18 21:40:49.152 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'scheduledConfig' of type [com.bc.exam.config.ScheduledConfig$$EnhancerBySpringCGLIB$$a2f65448] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.159 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroConfig' of type [com.bc.exam.config.ShiroConfig$$EnhancerBySpringCGLIB$$a4359c8c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.183 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'shiroRealm' of type [com.bc.exam.ability.shiro.ShiroRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.301 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'securityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.314 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.336 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ef79b091] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.344 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure' of type [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure$$EnhancerBySpringCGLIB$$925a603] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.346 INFO 16624 --- [main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource +2026-06-18 21:40:49.379 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.405 INFO 16624 --- [main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited +2026-06-18 21:40:49.405 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceWrapper] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.430 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.436 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration' of type [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration$$EnhancerBySpringCGLIB$$83edab9b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.440 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.transaction-org.springframework.boot.autoconfigure.transaction.TransactionProperties' of type [org.springframework.boot.autoconfigure.transaction.TransactionProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.442 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'platformTransactionManagerCustomizers' of type [org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.442 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration$DataSourceTransactionManagerConfiguration' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration$DataSourceTransactionManagerConfiguration$$EnhancerBySpringCGLIB$$9c7a4900] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.447 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionManager' of type [org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.448 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'transactionAopConfig' of type [com.bc.exam.config.TransactionAopConfig$$EnhancerBySpringCGLIB$$e6158819] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.452 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'txAdvice' of type [org.springframework.transaction.interceptor.TransactionInterceptor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.452 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'advisor' of type [org.springframework.aop.support.DefaultPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.484 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration' of type [org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration$$EnhancerBySpringCGLIB$$2928e41] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.486 INFO 16624 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'eventBus' of type [org.apache.shiro.event.support.DefaultEventBus] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2026-06-18 21:40:49.717 INFO 16624 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8101 (http) +2026-06-18 21:40:49.729 INFO 16624 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2026-06-18 21:40:49.729 INFO 16624 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17] +2026-06-18 21:40:49.776 INFO 16624 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +2026-06-18 21:40:49.776 INFO 16624 --- [main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1174 ms +2026-06-18 21:40:50.666 INFO 16624 --- [main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler' +2026-06-18 21:40:50.672 INFO 16624 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService +2026-06-18 21:40:50.673 INFO 16624 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'asyncExecutor' +2026-06-18 21:40:50.681 INFO 16624 --- [main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] +2026-06-18 21:40:50.984 INFO 16624 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Context refreshed +2026-06-18 21:40:50.993 INFO 16624 --- [main] d.s.w.p.DocumentationPluginsBootstrapper : Found 1 custom documentation plugin(s) +2026-06-18 21:40:51.008 INFO 16624 --- [main] s.d.s.w.s.ApiListingReferenceScanner : Scanning for api listing references +2026-06-18 21:40:51.093 INFO 16624 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: pagingUsingPOST_1 +2026-06-18 21:40:51.099 INFO 16624 --- [main] .d.s.w.r.o.CachingOperationNameGenerator : Generating unique operation named: saveUsingPOST_1 +2026-06-18 21:40:51.124 INFO 16624 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8101 (http) with context path '' +2026-06-18 21:40:51.126 INFO 16624 --- [main] com.bc.exam.ExamApplication : Started ExamApplication in 2.747 seconds (JVM running for 3.115) +2026-06-18 21:40:51.127 INFO 16624 --- [main] com.bc.exam.ExamApplication : +---------------------------------------------------------- + 系统启动成功,访问路径如下: + 本地路径: http://127.0.0.1:8101/ + 网络地址: http://192.168.3.104:8101/ + API文档: http://192.168.3.104:8101/doc.html +---------------------------------------------------------- +2026-06-18 21:40:59.303 INFO 16624 --- [http-nio-8101-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' +2026-06-18 21:40:59.303 INFO 16624 --- [http-nio-8101-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +2026-06-18 21:40:59.308 INFO 16624 --- [http-nio-8101-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 4 ms +2026-06-18 21:40:59.338 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:40:59.493 INFO 16624 --- [http-nio-8101-exec-2] org.dozer.config.GlobalSettings : Trying to find Dozer configuration file: dozer.properties +2026-06-18 21:40:59.495 WARN 16624 --- [http-nio-8101-exec-2] org.dozer.config.GlobalSettings : Dozer configuration file not found: dozer.properties. Using defaults for all Dozer global properties. +2026-06-18 21:40:59.496 INFO 16624 --- [http-nio-8101-exec-2] org.dozer.DozerInitializer : Initializing Dozer. Version: 5.5.0, Thread Name: http-nio-8101-exec-2 +2026-06-18 21:40:59.497 INFO 16624 --- [http-nio-8101-exec-2] org.dozer.jmx.JMXPlatformImpl : Dozer JMX MBean [org.dozer.jmx:type=DozerStatisticsController] auto registered with the Platform MBean Server +2026-06-18 21:40:59.497 INFO 16624 --- [http-nio-8101-exec-2] org.dozer.jmx.JMXPlatformImpl : Dozer JMX MBean [org.dozer.jmx:type=DozerAdminController] auto registered with the Platform MBean Server +2026-06-18 21:40:59.498 INFO 16624 --- [http-nio-8101-exec-2] org.dozer.DozerBeanMapper : Initializing a new instance of dozer bean mapper. +2026-06-18 21:41:11.120 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:31.263 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:31.294 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:35.777 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.440 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.443 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.449 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.449 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.450 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.455 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.496 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.504 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.507 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.518 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.523 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.526 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.545 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.549 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.556 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.566 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.568 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.571 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.595 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.597 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.605 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.610 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.613 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:48:41.614 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:09.018 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:09.021 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:09.025 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:09.028 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:13.327 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:13.327 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:13.333 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:13.333 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:18.830 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:18.834 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:18.837 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:18.841 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:20.243 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:20.245 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:20.250 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:20.252 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:21.706 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:21.706 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:21.713 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:21.713 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:30.253 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:30.257 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:30.258 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:49:30.263 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:26.134 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:28.612 WARN 16624 --- [http-nio-8101-exec-5] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 98606 +2026-06-18 21:50:48.743 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:48.743 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:48.749 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:48.749 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:50.097 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:50.098 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:50.102 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:50.104 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:53.618 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:53.619 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:53.624 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:50:53.624 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:48.866 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:48.874 WARN 16624 --- [http-nio-8101-exec-1] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 115240 +2026-06-18 21:52:48.880 WARN 16624 --- [http-nio-8101-exec-1] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 115246 +2026-06-18 21:52:48.886 WARN 16624 --- [http-nio-8101-exec-1] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 115252 +2026-06-18 21:52:48.894 WARN 16624 --- [http-nio-8101-exec-1] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 115263 +2026-06-18 21:52:48.902 WARN 16624 --- [http-nio-8101-exec-1] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 115272 +2026-06-18 21:52:49.104 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.110 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.139 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.140 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.195 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.195 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.202 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.202 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.208 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.208 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.262 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.264 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.268 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.268 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.271 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.290 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.306 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.307 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.313 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.313 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.319 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.333 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.344 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.346 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.354 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.359 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.365 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.366 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:52:49.370 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.167 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.174 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197491 +2026-06-18 21:56:07.180 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197504 +2026-06-18 21:56:07.186 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197510 +2026-06-18 21:56:07.191 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197808 +2026-06-18 21:56:07.198 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197822 +2026-06-18 21:56:07.204 WARN 16624 --- [http-nio-8101-exec-4] c.a.druid.pool.DruidAbstractDataSource : discard long time none received connection. , jdbcUrl : jdbc:mysql://110.42.189.169:3306/chdtushu?useSSL=false&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true, version : 1.2.5, lastPacketReceivedIdleMillis : 197832 +2026-06-18 21:56:07.426 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.441 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.452 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.463 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.508 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.514 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.515 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.517 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.519 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.525 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.573 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.574 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.577 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.577 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.580 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.604 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.618 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.622 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.625 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.634 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.642 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.655 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.657 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.662 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.664 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.666 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.670 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.688 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.694 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.698 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.701 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.701 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.705 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.721 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.725 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 21:56:07.731 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:53.350 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:53.402 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:58.057 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.376 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.376 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.380 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.380 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.383 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.390 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.437 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.437 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.438 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.442 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.442 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.465 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.477 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.477 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.480 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.483 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.495 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.507 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.513 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.513 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.518 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.530 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.535 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:01:59.543 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:01.310 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:05.945 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:05.945 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:05.951 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:05.951 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:09.279 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:09.279 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:09.286 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:09.286 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:23.548 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:23.549 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:23.555 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:23.556 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:30.962 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:30.962 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:30.969 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:30.969 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:43.388 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:43.388 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:43.398 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:43.398 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:44.472 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:44.472 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:44.479 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:44.481 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:46.159 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:46.159 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:46.165 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:02:46.166 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:16.350 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:18.490 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:18.495 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.503 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.514 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.562 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.562 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.562 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.567 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.567 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.568 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.621 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.621 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.621 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.625 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.625 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.626 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.663 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.663 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.664 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.669 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.688 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.694 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.699 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.704 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.704 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.710 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.725 WARN 16624 --- [http-nio-8101-exec-6] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.733 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.736 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.738 WARN 16624 --- [http-nio-8101-exec-8] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.740 WARN 16624 --- [http-nio-8101-exec-7] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.754 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.768 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.768 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.768 WARN 16624 --- [http-nio-8101-exec-2] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:19.769 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:22.785 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:22.785 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:22.790 WARN 16624 --- [http-nio-8101-exec-3] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:22.791 WARN 16624 --- [http-nio-8101-exec-4] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:24.725 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:24.730 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:24.731 WARN 16624 --- [http-nio-8101-exec-1] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:24.737 WARN 16624 --- [http-nio-8101-exec-10] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:25.888 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:25.889 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:25.895 WARN 16624 --- [http-nio-8101-exec-5] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:08:25.896 WARN 16624 --- [http-nio-8101-exec-9] o.s.j.d.DataSourceTransactionManager : Custom isolation level specified but no actual transaction initiated; isolation level will effectively be ignored: PROPAGATION_SUPPORTS,ISOLATION_READ_COMMITTED,readOnly,-java.lang.Exception +2026-06-18 22:17:57.516 INFO 16624 --- [Thread-8] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'asyncExecutor' +2026-06-18 22:17:57.516 INFO 16624 --- [Thread-8] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' +2026-06-18 22:17:57.516 INFO 16624 --- [Thread-8] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler' +2026-06-18 22:17:57.517 INFO 16624 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closing ... +2026-06-18 22:17:57.520 INFO 16624 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed