重构包名,解决JacksonAutoConfiguration被spring boot默认JacksonAutoConfiguration配置覆盖的问题
Sync All Branches to GitHub / sync (push) Successful in 2s
Sync All Branches to GitHub / sync (push) Successful in 2s
This commit is contained in:
+4
-4
@@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<!-- 指定父项目 -->
|
||||
<parent>
|
||||
<groupId>com.jy</groupId>
|
||||
<groupId>top.crushtj</groupId>
|
||||
<artifactId>xiaoyishu</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@@ -19,18 +19,18 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jy</groupId>
|
||||
<groupId>top.crushtj</groupId>
|
||||
<artifactId>xiaoyi-common</artifactId>
|
||||
</dependency>
|
||||
<!-- 业务接口日志组件 -->
|
||||
<dependency>
|
||||
<groupId>com.jy</groupId>
|
||||
<groupId>top.crushtj</groupId>
|
||||
<artifactId>xiaoyi-spring-boot-starter-biz-operationlog</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Jackson-->
|
||||
<dependency>
|
||||
<groupId>com.jy</groupId>
|
||||
<groupId>top.crushtj</groupId>
|
||||
<artifactId>xiaoyi-spring-boot-starter-jackson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth;
|
||||
package top.crushtj.xiaoyishu.auth;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.config;
|
||||
package top.crushtj.xiaoyishu.auth.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
@@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@MapperScan("com.jy.**.mappers")
|
||||
@MapperScan("top.crushtj.**.mappers")
|
||||
public class MybatisPlusConfig {
|
||||
/**
|
||||
* 分页插件
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.config;
|
||||
package top.crushtj.xiaoyishu.auth.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.constant;
|
||||
package top.crushtj.xiaoyishu.auth.constant;
|
||||
|
||||
/**
|
||||
*
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.controller;
|
||||
package top.crushtj.xiaoyishu.auth.controller;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -6,9 +6,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.jy.framework.biz.operationlog.aspect.ApiOperationLog;
|
||||
import com.jy.framework.common.response.Response;
|
||||
import com.jy.xiaoyishu.auth.model.vo.User;
|
||||
import top.crushtj.framework.biz.operationlog.aspect.ApiOperationLog;
|
||||
import top.crushtj.framework.common.response.Response;
|
||||
import top.crushtj.xiaoyishu.auth.model.vo.User;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package com.jy.xiaoyishu.auth.controller;
|
||||
package top.crushtj.xiaoyishu.auth.controller;
|
||||
|
||||
import com.jy.framework.biz.operationlog.aspect.ApiOperationLog;
|
||||
import com.jy.framework.common.response.Response;
|
||||
import com.jy.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
import com.jy.xiaoyishu.auth.service.VerificationCodeService;
|
||||
import top.crushtj.framework.biz.operationlog.aspect.ApiOperationLog;
|
||||
import top.crushtj.framework.common.response.Response;
|
||||
import top.crushtj.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
import top.crushtj.xiaoyishu.auth.service.VerificationCodeService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.domain.entity;
|
||||
package top.crushtj.xiaoyishu.auth.domain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.jy.xiaoyishu.auth.domain.mappers;
|
||||
package top.crushtj.xiaoyishu.auth.domain.mappers;
|
||||
|
||||
import com.jy.xiaoyishu.auth.domain.entity.UserEntity;
|
||||
import top.crushtj.xiaoyishu.auth.domain.entity.UserEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jy.xiaoyishu.auth.domain.mappers.UserMapper">
|
||||
<mapper namespace="top.crushtj.xiaoyishu.auth.domain.mappers.UserMapper">
|
||||
|
||||
<resultMap type="com.jy.xiaoyishu.auth.domain.entity.UserEntity" id="UserMap">
|
||||
<resultMap type="top.crushtj.xiaoyishu.auth.domain.entity.UserEntity" id="UserMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="username" column="username" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
package com.jy.xiaoyishu.auth.enums;
|
||||
package top.crushtj.xiaoyishu.auth.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import java.lang.String;
|
||||
|
||||
import com.jy.framework.common.exception.BaseExceptionInterface;
|
||||
import top.crushtj.framework.common.exception.BaseExceptionInterface;
|
||||
|
||||
/**
|
||||
*
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.exception;
|
||||
package top.crushtj.xiaoyishu.auth.exception;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -8,9 +8,9 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jy.framework.common.exception.BizException;
|
||||
import com.jy.framework.common.response.Response;
|
||||
import com.jy.xiaoyishu.auth.enums.ResponseCodeEnum;
|
||||
import top.crushtj.framework.common.exception.BizException;
|
||||
import top.crushtj.framework.common.response.Response;
|
||||
import top.crushtj.xiaoyishu.auth.enums.ResponseCodeEnum;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -63,7 +63,7 @@ public class GlobalExceptionHandler {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
// 获取校验不通过的字段,并组合错误信息,格式为: email 邮箱格式不正确, 当前值: '123124qq.com';
|
||||
Optional.ofNullable(bindingResult.getFieldErrors()).ifPresent(errors -> {
|
||||
Optional.of(bindingResult.getFieldErrors()).ifPresent(errors -> {
|
||||
errors.forEach(error -> sb.append(error.getField()).append(" ").append(error.getDefaultMessage())
|
||||
.append(", 当前值: '").append(error.getRejectedValue()).append("'; ")
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.model.vo;
|
||||
package top.crushtj.xiaoyishu.auth.model.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth.model.vo.verificationcode;
|
||||
package top.crushtj.xiaoyishu.auth.model.vo.verificationcode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.jy.xiaoyishu.auth.service;
|
||||
package top.crushtj.xiaoyishu.auth.service;
|
||||
|
||||
import com.jy.framework.common.response.Response;
|
||||
import com.jy.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
import top.crushtj.framework.common.response.Response;
|
||||
import top.crushtj.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
|
||||
/**
|
||||
*
|
||||
+7
-7
@@ -1,16 +1,16 @@
|
||||
package com.jy.xiaoyishu.auth.service.impl;
|
||||
package top.crushtj.xiaoyishu.auth.service.impl;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.jy.framework.common.exception.BizException;
|
||||
import com.jy.framework.common.response.Response;
|
||||
import com.jy.xiaoyishu.auth.constant.RedisKeyConstants;
|
||||
import com.jy.xiaoyishu.auth.enums.ResponseCodeEnum;
|
||||
import com.jy.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
import top.crushtj.framework.common.exception.BizException;
|
||||
import top.crushtj.framework.common.response.Response;
|
||||
import top.crushtj.xiaoyishu.auth.constant.RedisKeyConstants;
|
||||
import top.crushtj.xiaoyishu.auth.enums.ResponseCodeEnum;
|
||||
import top.crushtj.xiaoyishu.auth.model.vo.verificationcode.SendVerificationCodeReqVO;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.jy.xiaoyishu.auth.service.VerificationCodeService;
|
||||
import top.crushtj.xiaoyishu.auth.service.VerificationCodeService;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -64,11 +64,11 @@ spring:
|
||||
mybatis-plus:
|
||||
mapper-locations:
|
||||
- classpath*:top/crushtj/**/*.xml # 匹配所有模块中的 Mapper XML 文件
|
||||
type-aliases-package: com.jy.xiaoyishu.auth.domain.entity # 实体类包路径
|
||||
type-aliases-package: top.crushtj.xiaoyishu.auth.domain.entity # 实体类包路径
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 开启驼峰命名转换
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志输出(调试用)
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.jy.xiaoyishu.auth.domain.mappers: debug
|
||||
top.crushtj.xiaoyishu.auth.domain.mappers: debug
|
||||
@@ -50,11 +50,11 @@ spring:
|
||||
mybatis-plus:
|
||||
mapper-locations:
|
||||
- classpath*:top/crushtj/**/*.xml # 匹配所有模块中的 Mapper XML 文件
|
||||
type-aliases-package: com.jy.xiaoyishu.auth.domain.entity # 实体类包路径
|
||||
type-aliases-package: top.crushtj.xiaoyishu.auth.domain.entity # 实体类包路径
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 开启驼峰命名转换
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志输出(调试用)
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.jy.xiaoyishu.auth.domain.mappers: debug
|
||||
top.crushtj.xiaoyishu.auth.domain.mappers: debug
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth;
|
||||
package top.crushtj.xiaoyishu.auth;
|
||||
|
||||
import com.alibaba.druid.filter.config.ConfigTools;
|
||||
import lombok.SneakyThrows;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.jy.xiaoyishu.auth;
|
||||
package top.crushtj.xiaoyishu.auth;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
package com.jy.xiaoyishu.auth;
|
||||
package top.crushtj.xiaoyishu.auth;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import com.jy.xiaoyishu.auth.domain.entity.UserEntity;
|
||||
import com.jy.xiaoyishu.auth.domain.mappers.UserMapper;
|
||||
import top.crushtj.xiaoyishu.auth.domain.entity.UserEntity;
|
||||
import top.crushtj.xiaoyishu.auth.domain.mappers.UserMapper;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
Reference in New Issue
Block a user