摘要:
package com.imooc.mall.exception; /** * 描述: 统一异常 */ public class ImoocMallException extends RuntimeException { private final Integer code; private fin 阅读全文
摘要:
###泛型类 package com.imooc.mall.common; import com.imooc.mall.exception.ImoocMallExceptionEnum; /** * 描述: 通用返回对象 * 泛型类 */ public class ApiRestResponse<T 阅读全文
摘要:
1.添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> 2.定义切面类,实现web层的日志切面 要想把 阅读全文
摘要:
RequestContextHolder ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); HttpServletRequest 阅读全文
摘要:
###springboot项目添加log4j2日志组件 1,排除logback日志组件,加入新的log4j2日志组件,防止多个组件之间发生冲突 dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boo 阅读全文