diff --git a/mall-ebtp-cloud-jpa-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/jpa/starter/JpaStarterConfiguration.java b/mall-ebtp-cloud-jpa-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/jpa/starter/JpaStarterConfiguration.java index f00cbd0..f209f8f 100644 --- a/mall-ebtp-cloud-jpa-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/jpa/starter/JpaStarterConfiguration.java +++ b/mall-ebtp-cloud-jpa-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/jpa/starter/JpaStarterConfiguration.java @@ -1,72 +1,10 @@ package com.chinaunicom.mall.ebtp.cloud.jpa.starter; -import java.time.LocalDateTime; - -import org.apache.ibatis.reflection.MetaObject; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.PropertySource; -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; - -import cn.chinaunicom.sdsi.framework.config.mybatis.MyMetaObjectHandler; - @Configuration -@ComponentScan(value = "cn.chinaunicom.sdsi.framework.config.mybatis", excludeFilters = { - @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = { MyMetaObjectHandler.class }) }) @PropertySource("classpath:jpa-configuration.properties") public class JpaStarterConfiguration { - @Bean - @ConditionalOnMissingBean(MetaObjectHandler.class) - MetaObjectHandler metaObjectHandler() { - return new MetaObjectHandler() { - /** - * 更新元对象字段填充(用于更新时对公共字段的填充) - * - * @param metaObject 元对象 - */ - @Override - public void updateFill(MetaObject metaObject) { - final LocalDateTime now = LocalDateTime.now(); - - setFieldValByName("updateDate", now, metaObject); - setFieldValByName("lastUpdateTime", now, metaObject); - } - - /** - * 插入元对象字段填充(用于插入时对公共字段的填充) - * - * @param metaObject 元对象 - */ - @Override - public void insertFill(MetaObject metaObject) { - setFieldValByName("createBy", "tester", metaObject); - -// Object obj = getFieldValByName("createBy", metaObject); -// obj = getFieldValByName("createDate", metaObject); -// if (obj == null) { -// setFieldValByName("createDate", LocalDateTime.now(), metaObject); -// } -// obj = getFieldValByName("updateDate", metaObject); -// if (obj == null) { -// setFieldValByName("updateDate", LocalDateTime.now(), metaObject); -// } -// obj = getFieldValByName("tenantId", metaObject); -// if (obj == null) { -// setFieldValByName("tenantId", "ebtp_mall", metaObject); -// } -// obj = getFieldValByName("tenantName", metaObject); -// if (obj == null) { -// setFieldValByName("tenantName", "ebtp_mall", metaObject); -// } -// setFieldValByName("deleteFlag", CommonConstants.STATUS_NORMAL, metaObject); - } - }; - } - } diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/MvcStarterConfiguration.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/MvcStarterConfiguration.java index 4af4adc..60601f6 100644 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/MvcStarterConfiguration.java +++ b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/MvcStarterConfiguration.java @@ -1,15 +1,9 @@ package com.chinaunicom.mall.ebtp.cloud.mvc.starter; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; import org.springframework.context.annotation.PropertySource; -import com.chinaunicom.mall.ebtp.cloud.mvc.starter.advice.BusinessExceptionHandlerAdvice; - @Configuration -@Import({ - BusinessExceptionHandlerAdvice.class -}) @PropertySource("classpath:mcv-configuration.properties") public class MvcStarterConfiguration { } diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/advice/BusinessExceptionHandlerAdvice.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/advice/BusinessExceptionHandlerAdvice.java deleted file mode 100644 index 118b8e0..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/advice/BusinessExceptionHandlerAdvice.java +++ /dev/null @@ -1,254 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.advice; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.dao.DataAccessException; -import org.springframework.dao.EmptyResultDataAccessException; -import org.springframework.http.HttpStatus; -import org.springframework.validation.BindException; -import org.springframework.validation.FieldError; -import org.springframework.web.HttpRequestMethodNotSupportedException; -import org.springframework.web.bind.MissingServletRequestParameterException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; -import org.yaml.snakeyaml.constructor.DuplicateKeyException; - -import com.chinaunicom.ebtp.mall.cloud.common.utils.JsonUtils; -import com.chinaunicom.mall.ebtp.cloud.mvc.starter.base.BaseResponse; -import com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessException; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.exceptions.ExceptionUtil; -import lombok.Getter; -import lombok.Setter; -import lombok.extern.slf4j.Slf4j; - -/** - * 异常处理 拦截BindException异常,返回HttpStatus是400的绑定错误信息 - * 拦截FrameException异常,返回HttpStatus是406的业务处理错误信息(支持自定义状态码) - * 拦截Exception异常,返回HttpStatus是500服务器内部异常 - * - * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.advice.BusinessExceptionHandlerAdvice - * @description: - * @author fqj - * @date 2020年9月3日 - * @version: V1.0 - * @update - */ -@Slf4j -@ControllerAdvice -@ResponseBody -@ConditionalOnProperty(name = "mconfig.exception-handle-enabled", matchIfMissing = true) -public class BusinessExceptionHandlerAdvice { - - /** - * 业务异常处理 - * - * @param request 请求 - * @param exception ServiceErrorException异常对象 - * @return 响应 - */ - @ExceptionHandler(value = BusinessException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse serviceErrorException(HttpServletRequest request, BusinessException exception) { - log.error(ExceptionUtil.stacktraceToString(exception)); - - Map body = new HashMap<>(); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(exception.getCode(), exception.getMessage(), Convert.toStr(body)); - } - - /** - * 参数绑定异常 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(value = BindException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse methodArgumentNotValidHandler(HttpServletRequest request, BindException exception) { - // 按需重新封装需要返回的错误信息 - List invalidArguments = new ArrayList<>(); - - // 解析原错误信息,封装后返回,此处返回非法的字段名称,原始值,错误信息 - for (FieldError error : exception.getBindingResult().getFieldErrors()) { - ArgumentInvalidResult invalidArgument = new ArgumentInvalidResult(); - invalidArgument.setDefaultMessage(error.getDefaultMessage()); - invalidArgument.setField(error.getField()); - invalidArgument.setRejectedValue(error.getRejectedValue()); - invalidArguments.add(invalidArgument); - } - Map body = new HashMap<>(); - body.put("errors", JsonUtils.objectToJson(invalidArguments)); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数错误", Convert.toStr(body)); - } - - /** - * 请求方式异常 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(HttpRequestMethodNotSupportedException.class) - @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) - public BaseResponse handleMethodNotSupportedException(HttpServletRequest request, - HttpRequestMethodNotSupportedException exception) { - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.METHOD_NOT_ALLOWED.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.METHOD_NOT_ALLOWED.value(), "错误的请求方式", Convert.toStr(body)); - } - - /** - * 参数缺失 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(MissingServletRequestParameterException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse handleMissingParameterException(HttpServletRequest request, - MissingServletRequestParameterException exception) { - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数缺失", Convert.toStr(body)); - } - - // ---------------------------- 数据库操作相关异常 -------------------------------------- - - /** - * 数据库异常 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(DataAccessException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse handlerDataAccessException(HttpServletRequest request, DataAccessException exception) { - log.error(ExceptionUtil.stacktraceToString(exception)); - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "数据库异常", Convert.toStr(body)); - } - - /** - * 数据不存在 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(EmptyResultDataAccessException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse handleDataEmptyException(HttpServletRequest request, - EmptyResultDataAccessException exception) { - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "数据不存在", Convert.toStr(body)); - } - - /** - * 请求方式异常 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(DuplicateKeyException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse handleDataDualException(HttpServletRequest request, DuplicateKeyException exception) { - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "数据重复插入", Convert.toStr(body)); - } - - /** - * 方法参数类型不匹配异常 - * - * @param request 请求 - * @param exception BindException异常对象 - * @return 响应 - */ - @ExceptionHandler(MethodArgumentTypeMismatchException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public BaseResponse handleMethodArgumentTypeException(HttpServletRequest request, - MethodArgumentTypeMismatchException exception) { - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.BAD_REQUEST.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.BAD_REQUEST.value(), "参数类型不匹配", Convert.toStr(body)); - } - - /** - * 全局异常处理 - * - * @param request 请求 - * @param exception Exception异常对象 - * @return 响应 MethodArgumentNotValidException - */ - @ExceptionHandler(value = Exception.class) - @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) - public BaseResponse handleException(HttpServletRequest request, Exception exception) { - log.error(ExceptionUtil.stacktraceToString(exception)); - Map body = new HashMap<>(); - body.put("errors", exception.getMessage()); - body.put("error", HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase()); - body.put("path", request.getRequestURI()); - - return BaseResponse.fail(HttpStatus.INTERNAL_SERVER_ERROR.value(), "网络异常", Convert.toStr(body)); - } - - /** - * 参数异常 - */ - @Getter - @Setter - class ArgumentInvalidResult { - /** - * 字段名 - */ - private String field; - /** - * 输入的错误值 - */ - private Object rejectedValue; - /** - * 错误信息 - */ - private String defaultMessage; - } - -} diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/base/BaseResponse.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/base/BaseResponse.java deleted file mode 100644 index 60739a6..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/base/BaseResponse.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.base; - -import java.io.Serializable; - -import com.chinaunicom.mall.ebtp.cloud.mvc.starter.enums.ResponseEnum; -import com.fasterxml.jackson.annotation.JsonInclude; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -/** - * 返回类型FrameResponse - */ -@Getter -@NoArgsConstructor -@AllArgsConstructor -public class BaseResponse implements Serializable { - - private static final long serialVersionUID = 6769157532172136264L; - - private Integer code; - - private String message; - - @JsonInclude(JsonInclude.Include.NON_NULL) - private T data; - - public static BaseResponse success() { - return new BaseResponse<>(ResponseEnum.SUCCESS.getCode(), ResponseEnum.SUCCESS.getMessage(), ""); - } - - public static BaseResponse success(T data) { - return new BaseResponse<>(ResponseEnum.SUCCESS.getCode(), ResponseEnum.SUCCESS.getMessage(), data); - } - - public static BaseResponse success(String message, T data) { - return new BaseResponse<>(ResponseEnum.SUCCESS.getCode(), message, data); - } - - public static BaseResponse fail() { - return new BaseResponse<>(ResponseEnum.ERROR.getCode(), ResponseEnum.ERROR.getMessage(), ""); - } - - public static BaseResponse fail(String message) { - return new BaseResponse<>(ResponseEnum.ERROR.getCode(), message, ""); - } - - public static BaseResponse fail(Integer code, String message) { - return new BaseResponse<>(code, message, ""); - } - - public static BaseResponse fail(T data) { - return new BaseResponse<>(ResponseEnum.ERROR.getCode(), ResponseEnum.ERROR.getMessage(), data); - } - - public static BaseResponse fail(String message, T data) { - return new BaseResponse<>(ResponseEnum.ERROR.getCode(), message, data); - } - - public static BaseResponse fail(Integer code, String message, T data) { - return new BaseResponse(code, message, data); - } - -} \ No newline at end of file diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/enums/ResponseEnum.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/enums/ResponseEnum.java deleted file mode 100644 index 5654b27..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/enums/ResponseEnum.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.enums; - -import com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessExceptionAssert; - -import lombok.AllArgsConstructor; -import lombok.Getter; - - -/** - * 通用异常Enum - * - * @author 付庆吉 - * @date 2020-09-14 - */ -@Getter -@AllArgsConstructor -public enum ResponseEnum implements BusinessExceptionAssert { - - /** - * 成功 - */ - SUCCESS(0, "success"), - - /** - * 失败 - */ - ERROR(90000, "操作失败"), - - /** - * token not find - */ - TOKEN_NOT_FIND(30001, "认证不存在!"), - /** - * connect timeout - */ - CONNECT_TIMEOUT(30002, "连接超时!"); - - /** - * 返回码 - */ - private int code; - /** - * 返回消息 - */ - private String message; - - -} \ No newline at end of file diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/Assert.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/Assert.java deleted file mode 100644 index 3260779..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/Assert.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception; - -/** - * 通用断言接口 - * - * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.Assert - * @description: - * @author 付庆吉 - * @date 2020-09-14 - * @version: V1.0 - * @update - */ -public interface Assert { - - /** - * 创建异常 - * - * @param args - * @return - */ - BusinessException newException(Object... args); - - /** - * 创建异常 - * - * @param t - * @param args - * @return - */ - BusinessException newException(Throwable t, Object... args); - - /** - *

断言对象obj非空。如果对象obj为空,则抛出异常 - * - * @param obj 待判断对象 - */ - default void assertNotNull(Object obj) { - if (obj == null) { - throw newException(obj); - } - } - - /** - *

断言对象args非空。如果对象args为null或空字符串,则抛出异常 - * - * @param args 待判断字符串 - */ - default void assertStrNotNull(String... args) { - this.assertNotNull(args); - for (String arg : args) { - if (arg == null || arg.isEmpty()) { - throw newException(arg); - } - } - } - - /** - * 根据传参抛出异常,则抛出异常 - * - * @param t 验证结果 - */ - default void customValid(boolean t) { - if (t) { - throw newException(); - } - } - - /** - * 抛出异常 - */ - default void throwException() { - throw newException(); - } - -} \ No newline at end of file diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java deleted file mode 100644 index cb1910b..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessException.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception; - -import lombok.Getter; -import lombok.Setter; - -/** - * 平台自定义异常类 - * - * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessException - * @description: 平台自定义异常类 - * @author: ajaxfan - * @date: 2020-10-22 - * @version: V1.0 - * @update - */ -@Getter -@Setter -public class BusinessException extends RuntimeException { - private static final long serialVersionUID = 1L; - - private Integer code; - private String message; - - public BusinessException(IResponseEnum iResponseEnum, String message) { - super(message); - this.code = iResponseEnum.getCode(); - this.message = message; - } - - public BusinessException(IResponseEnum iResponseEnum, String message, Throwable cause) { - super(message, cause); - this.code = iResponseEnum.getCode(); - this.message = message; - } - -} diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java deleted file mode 100644 index 25dcf38..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/BusinessExceptionAssert.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception; - -import java.text.MessageFormat; - -/** - * 初始化异常及断言接口,所有自定义异常Enum均需实现此接口 - *

- * 自定义异常枚举中年必须有:code、message - * - * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.BusinessExceptionAssert - * @description: - * @author 付庆吉 - * @date 2020-09-14 - * @version: V1.0 - * @update - */ -public interface BusinessExceptionAssert extends IResponseEnum, Assert { - - @Override - default BusinessException newException(Object... args) { - String msg = MessageFormat.format(this.getMessage(), args); - - return new BusinessException(this, msg); - } - - @Override - default BusinessException newException(Throwable t, Object... args) { - String msg = MessageFormat.format(this.getMessage(), args); - - return new BusinessException(this, msg, t); - } - -} \ No newline at end of file diff --git a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java b/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java deleted file mode 100644 index 9d5af26..0000000 --- a/mall-ebtp-cloud-mvc-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/mvc/starter/exception/IResponseEnum.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception; - -/** - * 异常编码和消息 - * - * @file: com.chinaunicom.mall.ebtp.cloud.mvc.starter.exception.IResponseEnum - * @description: - * @author 付庆吉 - * @date 2020-09-14 - * @version: V1.0 - * @update - */ -public interface IResponseEnum { - - int getCode(); - - String getMessage(); - -} diff --git a/mall-ebtp-cloud-parent/pom.xml b/mall-ebtp-cloud-parent/pom.xml index ccafdf7..f99136f 100644 --- a/mall-ebtp-cloud-parent/pom.xml +++ b/mall-ebtp-cloud-parent/pom.xml @@ -64,6 +64,11 @@ mybatis-plus-boot-starter ${mybatis-plus.version} + + com.baomidou + mybatis-plus-generator + ${mybatis-plus.version} + com.github.pagehelper pagehelper-spring-boot-starter