@ -11,7 +11,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
* 认证授权中心
*</p>
*
* @Author: 开发团队-王翔
* @Author: wangxaing4
* @Date: 2022/2/16
*/
@EnableKiccFeignClients
@ -35,7 +35,7 @@ import java.util.Map;
* 认证服务器配置
* @Author: entfrm开发团队-王翔
* @Date: 2022/2/20
@Configuration
@ -26,7 +26,7 @@ import org.springframework.security.web.authentication.logout.LogoutSuccessHandl
* 并且设置为主,以及加载优先级为1,防止被微服务工程覆盖
@ -38,7 +38,7 @@ import java.util.stream.Collectors;
* token端点管理
@Slf4j
@ -17,7 +17,7 @@ import org.springframework.stereotype.Component;
* 登录失败处理
@ -15,7 +15,7 @@ import org.springframework.stereotype.Component;
* 登录成功处理
@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
* 注销成功处理
@ -12,7 +12,7 @@ import org.springframework.cloud.stream.annotation.EnableBinding;
* 消息中心消费者启动类
* @Date: 2022/3/9
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
@ -15,7 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
* 消息订单消息
@ -11,7 +11,7 @@ import org.springframework.stereotype.Service;
* 短信消费者业务
* 消息中心生产者启动类
@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
* 发送短信控制器
@RestController
* 测试订单事务控制器
* @Date: 2022/3/10
@ -21,7 +21,7 @@ import java.util.List;
* 发送之后用于控制原子性的类
* 在消息发送之后,收到rocketmq的发送结果通知后才提交的本地事务。
* @author entfrm开发团队-王翔
* @author wangxaing4
* @link https://blog.csdn.net/guzhangyu12345/article/details/107989633
*//*
@ -5,7 +5,7 @@ package com.cloud.kicc.mq.service;
* 发送短消息业务类
public interface SmsService {
* 订单事务消息
public interface TransactionOrderService {
* 发送短信实现类
@Service
@ -22,7 +22,7 @@ import java.util.UUID;
* 订单事务消息实现
@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* Seata订单启动类
* @Date: 2022/3/11
@SpringBootApplication
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
* 订单控制器类
@ -11,7 +11,7 @@ import lombok.experimental.Accessors;
* 订单实体类
@Data
@ -8,7 +8,7 @@ import com.cloud.kicc.order.entity.Order;
* 订单mapper
public interface OrderMapper extends BaseMapper<Order> {
@ -9,7 +9,7 @@ import com.cloud.kicc.order.entity.Order;
* 订单业务接口类
public interface OrderService extends IService<Order> {
@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
* 订单业务实现类
* Seata积分启动类
* 积分控制器类
* 积分实体类
@ -8,7 +8,7 @@ import com.cloud.kicc.point.entity.Point;
* 积分mapper类
public interface PointMapper extends BaseMapper<Point> {
* 积分业务接口类
public interface PointService extends IService<Point> {
* 积分业务实现类
@ -9,7 +9,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* Seata用户启动类
@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
* 用户控制器
* 用户表
@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
* 远程调用订单接口
@FeignClient(contextId = "remoteOrderService" , value = ServiceNameConstants.SEATA_ORDER_SERVICE)
@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.PostMapping;
* 远程调用积分接口
@FeignClient(contextId = "remotePointService" , value = ServiceNameConstants.SEATA_POINT_SERVICE)
@ -8,7 +8,7 @@ import com.cloud.kicc.user.entity.User;
* 用户mapper类
public interface UserMapper extends BaseMapper<User> {
* 用户业务类
public interface UserService extends IService<User> {
* 用户业务实现类
@ -10,7 +10,7 @@ import java.lang.annotation.*;
* 激活 Jackson 自动转换配置
* @Date: 2022/2/19
@Target({ ElementType.TYPE })
@ -13,7 +13,7 @@ import java.util.Map;
* 响应信息主体
* @Date: 2022/2/18
@ToString
@ -12,7 +12,7 @@ import java.util.List;
* 网关配置文件
* @Date: 2022/2/17
@ -21,7 +21,7 @@ import java.util.TimeZone;
* 配置全局JacksonConfig,影响mvc层的对象传输日期格式
@EnableAutoConfiguration
@ -9,7 +9,7 @@ import org.springframework.web.client.RestTemplate;
* Rest 配置
@Configuration(proxyBeanMethods = false)
@ -17,7 +17,7 @@ import static org.springframework.boot.autoconfigure.condition.ConditionalOnWebA
* 针对GET请求传入参数转换
@ -5,7 +5,7 @@ package com.cloud.kicc.common.core.constant;
* 应用前缀
* @Date: 2022/2/24
public interface AppConstants {
* 缓存的key 常量
public interface CacheConstants {
* 通用常量
public interface CommonConstants {
* 正则表达式常量
* @Date: 2022/4/18
public interface RegexConstants {
* 安全常量
public interface SecurityConstants {
* 服务名称
public interface ServiceNameConstants {
@ -17,7 +17,7 @@ package com.cloud.kicc.common.core.constant;
* <li>Strings computed by constant expressions are computed at compile time and then treated as if they were literals.</li>
* <li>Strings computed by concatenation at run time are newly created and therefore distinct.</li>
* </ul>
public interface StringPool {
@ -8,7 +8,7 @@ import lombok.RequiredArgsConstructor;
* 社交登录类型
@Getter
@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
* 检查异常
@NoArgsConstructor
@ -5,7 +5,7 @@ package com.cloud.kicc.common.core.exception;
* 验证码异常
public class ValidateCodeException extends RuntimeException {
@ -17,7 +17,7 @@ import java.util.Properties;
* @link https://blog.csdn.net/zxl8899/article/details/106382719/
* @Date: 2022/3/7
@AllArgsConstructor
@ -23,7 +23,7 @@ import java.time.format.DateTimeFormatter;
* java 8 时间默认序列化
public class KiccJavaTimeModule extends SimpleModule {
@ -8,7 +8,7 @@ import lombok.experimental.UtilityClass;
* 基础工具类
* @Date: 2022/3/21
@UtilityClass
@ -18,7 +18,7 @@ import java.lang.reflect.Method;
* 扩展类工具类
@ -11,7 +11,7 @@ import java.util.regex.Pattern;
* HTML过滤器,用于去除XSS漏洞隐患。
public final class HTMLFilterUtil {
@ -11,7 +11,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
* Jasypt加解密单元测试
public class JasyptUtil {
@ -10,7 +10,7 @@ import cn.hutool.core.util.StrUtil;
* 拼音工具类
public class PinyinUtil {
@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
* Spring工具类
@ -8,7 +8,7 @@ import java.util.Date;
* 时间计算工具类
* @Date: 2022/1/15
public class TimeUtils {
@ -29,7 +29,7 @@ import java.util.Optional;
* 扩展用于 Web 应用程序的各种实用程序工具类
@ -23,7 +23,7 @@ import org.springframework.context.annotation.PropertySource;
* mybatis plus 统一配置
@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.RedisSerializer;
* Redis 配置
@EnableCaching
@ -12,7 +12,7 @@ import java.io.Serializable;
* 基础模型
* @Date: 2021/12/28
@ -16,7 +16,7 @@ import java.util.Date;
* 通用模型
@ -14,7 +14,7 @@ import java.util.Collection;
* 扩展安全框架用户信息
@Accessors(chain = true)
@ -14,7 +14,7 @@ import java.util.List;
* 树结构模型
@ -8,7 +8,7 @@ import lombok.Getter;
* 数据类型
@ -14,7 +14,7 @@ import java.util.Optional;
* 公共字段自动填充
public class BaseMetaObjectHandler implements MetaObjectHandler {
@ -18,7 +18,7 @@ import java.util.Optional;
* 多租户拦截处理
* @Date: 2022/4/2
public class KiccTenantLineHandler implements TenantLineHandler {
@ -13,7 +13,7 @@ import java.util.Objects;
* 而多租户like条件经过处理不许需要加'',如果加上会导致数据查不出
* @Date: 2022/5/11
public class TenantLikeExpression extends ASTNodeAccessImpl implements Expression {
@ -19,7 +19,7 @@ import java.sql.SQLException;
* 重构分页插件, 当 size 小于 0 时, 直接设置为 0, 防止错误查询全表
public class KiccPaginationInnerInterceptor extends PaginationInnerInterceptor {
@ -42,7 +42,7 @@ import java.util.stream.Collectors;
* 支持多租户ID不存在时,查询所有租户ID数据
@ -10,7 +10,7 @@ import java.util.List;
* 多租户配置
* @Date: 2022/4/2+
@ -17,7 +17,7 @@ import javax.sql.DataSource;
* 动态数据源切换配置
* 开启动态数据源
@ -19,7 +19,7 @@ import org.springframework.context.annotation.Scope;
* sentinel 配置
@ -13,7 +13,7 @@ import java.lang.annotation.*;
* 扩展Feign请求接口支持自动熔断降级
@Target(ElementType.TYPE)
@ -18,7 +18,7 @@ import java.nio.charset.StandardCharsets;
* 自定义feign错误响应数据
* @Date: 2022/5/16
@ -21,7 +21,7 @@ import org.springframework.context.annotation.Scope;
@ -25,7 +25,7 @@ import java.util.Map;
* 支持自动降级注入 重写 {@link com.alibaba.cloud.sentinel.feign.SentinelFeign}
public final class KiccSentinelFeign {
@ -21,7 +21,7 @@ import java.util.Optional;
* 会出现:The dependencies of some of the beans in the application context form a cycle 循环依赖问题
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ -31,7 +31,7 @@ import static feign.Util.checkNotNull;
* 重新写入一些提示降级信息
@ -24,7 +24,7 @@ import java.util.List;
* 因为授权那边有自己的异常处理不能覆盖授权异常处理
@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletResponse;
* sentinel统一降级限流返回处理
@ -11,7 +11,7 @@ import javax.servlet.http.HttpServletRequest;
* 白名单/黑名单
public class KiccHeaderRequestOriginParser implements RequestOriginParser {
@ -26,7 +26,7 @@ import java.util.Map;
* feign 自动配置功能内置基于mica
public class KiccFeignClientsRegistrar implements ImportBeanDefinitionRegistrar, BeanClassLoaderAware, EnvironmentAware {
@ -18,7 +18,7 @@ import java.util.stream.Collectors;
* xxl-job自动装配
* 激活xxl-job配置
@ -7,7 +7,7 @@ import lombok.Data;
* xxl-job管理平台配置
* xxl-job执行器配置
@ -9,7 +9,7 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
* xxl-job配置
@ -14,7 +14,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
* 日志自动配置
@EnableAsync
@ -7,7 +7,7 @@ import java.lang.annotation.*;
* 操作日志注解
@Target(ElementType.METHOD)
@ -17,7 +17,7 @@ import org.aspectj.lang.annotation.Aspect;
* 操作日志使用spring event异步入库
@Aspect
@ -8,7 +8,7 @@ import org.springframework.context.ApplicationEvent;
* 系统日志事件
public class SysLogEvent extends ApplicationEvent {
@ -14,7 +14,7 @@ import org.springframework.scheduling.annotation.Async;
* 异步监听日志事件