mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-02-01 19:24:57 +08:00
[fix] 修改标签
This commit is contained in:
parent
550f4cbdae
commit
6eec60e9dd
3
pom.xml
3
pom.xml
@ -30,8 +30,7 @@
|
||||
</modules>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>芋道项目基础脚手架</description>
|
||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
||||
<description>项目基础脚手架</description>
|
||||
|
||||
<properties>
|
||||
<revision>2.3.0-SNAPSHOT</revision>
|
||||
|
@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.common.core;
|
||||
/**
|
||||
* 可生成 Int 数组的接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface IntArrayValuable {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.io.Serializable;
|
||||
/**
|
||||
* Key Value 的键值对
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
@ -10,7 +10,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 通用状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 文档地址
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 终端的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
@ -5,7 +5,7 @@ package cn.iocoder.yudao.framework.common.enums;
|
||||
*
|
||||
* 考虑到每个 starter 都需要用到该工具类,所以放到 common 模块下的 enums 包下
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface WebFilterOrderEnum {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
* 虽然说,HTTP 响应状态码作为业务使用表达能力偏弱,但是使用在系统层面还是非常不错的
|
||||
* 比较特殊的是,因为之前一直使用 0 作为成功,就不使用 200 啦。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface GlobalErrorCodeConstants {
|
||||
|
||||
|
@ -25,7 +25,7 @@ package cn.iocoder.yudao.framework.common.exception.enums;
|
||||
* 不限制规则。
|
||||
* 一般建议,每个模块自增。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ServiceErrorCodeRange {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.concurrent.Executors;
|
||||
/**
|
||||
* Cache 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class CacheUtils {
|
||||
|
||||
|
@ -13,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* Array 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ArrayUtils {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import static java.util.Arrays.asList;
|
||||
/**
|
||||
* Collection 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class CollectionUtils {
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* Map 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class MapUtils {
|
||||
|
||||
|
@ -7,7 +7,7 @@ import java.util.Set;
|
||||
/**
|
||||
* Set 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class SetUtils {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.util.Date;
|
||||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class DateUtils {
|
||||
|
||||
|
@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* 时间工具类,用于 {@link java.time.LocalDateTime}
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class LocalDateTimeUtils {
|
||||
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
/**
|
||||
* HTTP 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class HttpUtils {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.io.File;
|
||||
/**
|
||||
* 文件工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class FileUtils {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.io.InputStream;
|
||||
/**
|
||||
* IO 工具类,用于 {@link cn.hutool.core.io.IoUtil} 缺失的方法
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class IoUtils {
|
||||
|
||||
|
@ -21,7 +21,7 @@ import java.util.List;
|
||||
/**
|
||||
* JSON 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class JsonUtils {
|
||||
|
@ -7,7 +7,7 @@ import org.apache.skywalking.apm.toolkit.trace.TraceContext;
|
||||
*
|
||||
* 考虑到每个 starter 都需要用到该工具类,所以放到 common 模块下的 util 包下
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class TracerUtils {
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.math.RoundingMode;
|
||||
/**
|
||||
* 金额工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class MoneyUtils {
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.math.BigDecimal;
|
||||
/**
|
||||
* 数字的工具类,补全 {@link cn.hutool.core.util.NumberUtil} 的功能
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class NumberUtils {
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.function.Consumer;
|
||||
* 1. 默认使用 {@link cn.hutool.core.bean.BeanUtil} 作为实现类,虽然不同 bean 工具的性能有差别,但是对绝大多数同学的项目,不用在意这点性能
|
||||
* 2. 针对复杂的对象转换,可以搜参考 AuthConvert 实现,通过 mapstruct + default 配合实现
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class BeanUtils {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* Object 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ObjectUtils {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import static java.util.Collections.singletonList;
|
||||
/**
|
||||
* {@link cn.iocoder.yudao.framework.common.pojo.PageParam} 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class PageUtils {
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 客户端工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ServletUtils {
|
||||
|
||||
|
@ -7,7 +7,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* Spring 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class SpringUtils extends SpringUtil {
|
||||
|
||||
|
@ -13,7 +13,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 字符串工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class StrUtils {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* 校验工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ValidationUtils {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
*
|
||||
* 数据可见 resources/area.csv 文件
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
@ -9,7 +9,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 区域类型枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
|
@ -22,7 +22,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
/**
|
||||
* 区域工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class AreaUtils {
|
||||
|
@ -6,6 +6,6 @@
|
||||
* 2. 城市功能:查询城市编码对应的城市信息
|
||||
* 基于 https://github.com/modood/Administrative-divisions-of-China 实现
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.ip;
|
||||
|
@ -10,7 +10,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
/**
|
||||
* {@link AreaUtils} 的单元测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class AreaUtilsTest {
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 字典工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class DictFrameworkUtils {
|
||||
|
@ -14,7 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* Excel 数据字典转换器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class DictConvert implements Converter<Object> {
|
||||
|
@ -10,7 +10,7 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
/**
|
||||
* Excel Json 转换器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class JsonConvert implements Converter<Object> {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.math.RoundingMode;
|
||||
*
|
||||
* 金额单位:分
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class MoneyConvert implements Converter<Integer> {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import java.util.List;
|
||||
/**
|
||||
* Excel 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class ExcelUtils {
|
||||
|
||||
|
@ -3,7 +3,7 @@ package cn.iocoder.yudao.framework.quartz.core.handler;
|
||||
/**
|
||||
* 任务处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface JobHandler {
|
||||
|
||||
|
@ -21,7 +21,7 @@ import static cn.hutool.core.exceptions.ExceptionUtil.getRootCauseMessage;
|
||||
/**
|
||||
* 基础 Job 调用者,负责调用 {@link JobHandler#execute(String)} 执行任务
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@DisallowConcurrentExecution
|
||||
@PersistJobDataAfterExecution
|
||||
|
@ -16,7 +16,7 @@ import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionU
|
||||
*
|
||||
* 另外,jobHandlerName 对应到 Spring Bean 的名字,直接调用
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class SchedulerManager {
|
||||
|
||||
|
@ -7,7 +7,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* Job 日志 Framework Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface JobLogFrameworkService {
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
/**
|
||||
* Quartz Cron 表达式的工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class CronUtils {
|
||||
|
||||
|
@ -11,7 +11,7 @@ import org.springframework.context.annotation.Bean;
|
||||
/**
|
||||
* Metrics 配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({MeterRegistryCustomizer.class})
|
||||
|
@ -12,7 +12,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Trace 过滤器,打印 traceId 到 header 中返回
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class TraceFilter extends OncePerRequestFilter {
|
||||
|
||||
|
@ -11,7 +11,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 链路追踪 Util
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class TracerFrameworkUtils {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 使用 SkyWalking 组件,作为链路追踪、日志中心。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.tracer;
|
||||
|
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Bean;
|
||||
/**
|
||||
* RabbitMQ 消息队列配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@Slf4j
|
||||
|
@ -33,7 +33,7 @@ import java.util.Properties;
|
||||
/**
|
||||
* Redis 消息队列 Consumer 配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
@EnableScheduling // 启用定时任务,用于 RedisPendingMessageResendJob 重发消息
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||
/**
|
||||
* Redis 消息队列 Producer 配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
@AutoConfiguration(after = YudaoRedisAutoConfiguration.class)
|
||||
|
@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* Redis MQ 操作模板类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class RedisMQTemplate {
|
||||
|
@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.mq.redis.core.message.AbstractRedisMessage;
|
||||
* 通过拦截器,作为插件机制,实现拓展。
|
||||
* 例如说,多租户场景下的 MQ 消息处理
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public interface RedisMessageInterceptor {
|
||||
|
||||
|
@ -8,7 +8,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Redis 消息抽象基类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Data
|
||||
public abstract class AbstractRedisMessage {
|
||||
|
@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
/**
|
||||
* Redis Channel Message 抽象类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public abstract class AbstractRedisChannelMessage extends AbstractRedisMessage {
|
||||
|
||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||
*
|
||||
* @param <T> 消息类型。一定要填写噢,不然会报错
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public abstract class AbstractRedisChannelMessageListener<T extends AbstractRedisChannelMessage> implements MessageListener {
|
||||
|
||||
|
@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
/**
|
||||
* Redis Stream Message 抽象类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public abstract class AbstractRedisStreamMessage extends AbstractRedisMessage {
|
||||
|
||||
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||
*
|
||||
* @param <T> 消息类型。一定要填写噢,不然会报错
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public abstract class AbstractRedisStreamMessageListener<T extends AbstractRedisStreamMessage>
|
||||
implements StreamListener<String, ObjectRecord<String, String>> {
|
||||
|
@ -15,7 +15,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 当 IdType 为 {@link IdType#NONE} 时,根据 PRIMARY 数据源所使用的数据库,自动设置
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class IdTypeEnvironmentPostProcessor implements EnvironmentPostProcessor {
|
||||
|
@ -23,7 +23,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* MyBaits 配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AutoConfiguration(before = MybatisPlusAutoConfiguration.class) // 目的:先于 MyBatis Plus 自动配置,避免 @MapperScan 可能扫描不到 Mapper 打印 warn 日志
|
||||
@MapperScan(value = "${yudao.info.base-package}", annotationClass = Mapper.class,
|
||||
|
@ -17,7 +17,7 @@ import java.time.LocalDateTime;
|
||||
* 为什么实现 {@link TransPojo} 接口?
|
||||
* 因为使用 Easy-Trans TransType.SIMPLE 模式,集成 MyBatis Plus 查询
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(value = "transMap") // 由于 Easy-Trans 会添加 transMap 属性,避免 Jackson 在 Spring Cache 反序列化报错
|
||||
|
@ -16,7 +16,7 @@ import java.sql.SQLException;
|
||||
* 字段字段的 TypeHandler 实现类,基于 {@link cn.hutool.crypto.symmetric.AES} 实现
|
||||
* 可通过 jasypt.encryptor.password 配置项,设置密钥
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class EncryptTypeHandler extends BaseTypeHandler<String> {
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* List<Long> 的类型转换器实现类,对应数据库的 varchar 类型
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@MappedJdbcTypes(JdbcType.VARCHAR)
|
||||
@MappedTypes(List.class)
|
||||
|
@ -15,7 +15,7 @@ import java.sql.SQLException;
|
||||
/**
|
||||
* JDBC 工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class JdbcUtils {
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.time.Duration;
|
||||
* 在 {@link Cacheable#cacheNames()} 格式为 "key#ttl" 时,# 后面的 ttl 为过期时间。
|
||||
* 单位为最后一个字母(支持的单位有:d 天,h 小时,m 分钟,s 秒),默认单位为 s 秒
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class TimeoutRedisCacheManager extends RedisCacheManager {
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Redis 测试 Configuration,主要实现内嵌 Redis 的启动
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Lazy(false) // 禁止延迟加载
|
||||
|
@ -21,7 +21,7 @@ import javax.sql.DataSource;
|
||||
* 因为我们在单元测试会使用 spring.main.lazy-initialization 为 true,开启延迟加载。此时,会导致 DataSourceInitializationConfiguration 初始化
|
||||
* 不过呢,当前类的实现代码,基本是复制 DataSourceInitializationConfiguration 的哈!
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ConditionalOnMissingBean(AbstractScriptDatabaseInitializer.class)
|
||||
|
@ -22,7 +22,7 @@ import org.springframework.test.context.jdbc.Sql;
|
||||
*
|
||||
* 相比 {@link BaseDbUnitTest} 来说,额外增加了内存 Redis
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class)
|
||||
@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
|
||||
|
@ -19,7 +19,7 @@ import org.springframework.test.context.jdbc.Sql;
|
||||
*
|
||||
* 注意,Service 层同样适用。对于 Service 层的单元测试,我们针对自己模块的 Mapper 走的是 H2 内存数据库,针对别的模块的 Service 走的是 Mock 方法
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class)
|
||||
@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
|
||||
|
@ -6,7 +6,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
|
||||
/**
|
||||
* 纯 Mockito 的单元测试
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
public class BaseMockitoUnitTest {
|
||||
|
@ -14,7 +14,7 @@ import org.springframework.test.context.ActiveProfiles;
|
||||
*
|
||||
* 相比 {@link BaseDbUnitTest} 来说,从内存 DB 改成了内存 Redis
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseRedisUnitTest.Application.class)
|
||||
@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
|
||||
|
@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
/**
|
||||
* 单元测试,assert 断言工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class AssertUtils {
|
||||
|
||||
|
@ -21,7 +21,7 @@ import java.util.stream.Stream;
|
||||
/**
|
||||
* 随机工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class RandomUtils {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* 访问日志注解
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
|
@ -44,7 +44,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
||||
*
|
||||
* 目的:记录 API 访问日志到数据库中
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class ApiAccessLogFilter extends ApiRequestFilter {
|
||||
|
@ -24,7 +24,7 @@ import java.util.stream.IntStream;
|
||||
*
|
||||
* 目的:在非 prod 环境时,打印 request 和 response 两条日志到日志文件(控制台)中。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class ApiAccessLogInterceptor implements HandlerInterceptor {
|
||||
|
@ -3,6 +3,6 @@
|
||||
* 1. API 访问日志:记录用户访问 API 的访问日志,定期归档历史日志。
|
||||
* 2. 异常日志:记录用户访问 API 的系统异常,方便日常排查问题与告警。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.apilog;
|
||||
|
@ -7,7 +7,7 @@ import org.springframework.context.annotation.Bean;
|
||||
/**
|
||||
* Banner 的自动配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AutoConfiguration
|
||||
public class YudaoBannerAutoConfiguration {
|
||||
|
@ -11,7 +11,7 @@ import java.util.concurrent.TimeUnit;
|
||||
/**
|
||||
* 项目启动成功后,提供文档相关的地址
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@Slf4j
|
||||
public class BannerApplicationRunner implements ApplicationRunner {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Banner 用于在 console 控制台,打印开发文档、接口文档等
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.banner;
|
||||
|
@ -8,7 +8,7 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
/**
|
||||
* Swagger 配置属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@ConfigurationProperties("yudao.swagger")
|
||||
@Data
|
||||
|
@ -40,7 +40,7 @@ import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.HEADER_
|
||||
* 1. Springdoc 文档地址:<a href="https://github.com/springdoc/springdoc-openapi">仓库</a>
|
||||
* 2. Swagger 规范,于 2015 更名为 OpenAPI 规范,本质是一个东西
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({OpenAPI.class})
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 基于 Swagger + Knife4j 实现 API 接口文档
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
package cn.iocoder.yudao.framework.swagger;
|
||||
|
@ -10,7 +10,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 过滤 /admin-api、/app-api 等 API 请求的过滤器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public abstract class ApiRequestFilter extends OncePerRequestFilter {
|
||||
|
@ -12,7 +12,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Request Body 缓存 Filter,实现它的可重复读取
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class CacheRequestBodyFilter extends OncePerRequestFilter {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.io.InputStreamReader;
|
||||
/**
|
||||
* Request Body 缓存 Wrapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class CacheRequestBodyWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
|
@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC
|
||||
/**
|
||||
* 演示 Filter,禁止用户发起写操作,避免影响测试数据
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class DemoFilter extends OncePerRequestFilter {
|
||||
|
||||
|
@ -45,7 +45,7 @@ import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeC
|
||||
/**
|
||||
* 全局异常处理器,将 Exception 翻译成 CommonResult + 对应的异常编号
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
@AllArgsConstructor
|
||||
|
@ -17,7 +17,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
/**
|
||||
* 专属于 web 包的工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class WebFrameworkUtils {
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* Xss 配置属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "yudao.xss")
|
||||
@Validated
|
||||
|
@ -15,7 +15,7 @@ import java.io.IOException;
|
||||
/**
|
||||
* Xss 过滤器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
public class XssFilter extends OncePerRequestFilter {
|
||||
|
@ -10,7 +10,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Xss 请求 Wrapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author hhyykk
|
||||
*/
|
||||
public class XssRequestWrapper extends HttpServletRequestWrapper {
|
||||
|
||||
|
@ -23,7 +23,7 @@ public class DesensitizeTest {
|
||||
public void test() {
|
||||
// 准备参数
|
||||
DesensitizeDemo desensitizeDemo = new DesensitizeDemo();
|
||||
desensitizeDemo.setNickname("芋道源码");
|
||||
desensitizeDemo.setNickname("hhyykk");
|
||||
desensitizeDemo.setBankCard("9988002866797031");
|
||||
desensitizeDemo.setCarLicense("粤A66666");
|
||||
desensitizeDemo.setFixedPhone("01086551122");
|
||||
@ -34,9 +34,9 @@ public class DesensitizeTest {
|
||||
desensitizeDemo.setSlider2("ABCDEFG");
|
||||
desensitizeDemo.setSlider3("ABCDEFG");
|
||||
desensitizeDemo.setEmail("1@email.com");
|
||||
desensitizeDemo.setRegex("你好,我是芋道源码");
|
||||
desensitizeDemo.setRegex("你好,我是hhyykk");
|
||||
desensitizeDemo.setAddress("北京市海淀区上地十街10号");
|
||||
desensitizeDemo.setOrigin("芋道源码");
|
||||
desensitizeDemo.setOrigin("hhyykk");
|
||||
|
||||
// 调用
|
||||
DesensitizeDemo d = JsonUtils.parseObject(JsonUtils.toJsonString(desensitizeDemo), DesensitizeDemo.class);
|
||||
@ -55,7 +55,7 @@ public class DesensitizeTest {
|
||||
assertEquals("1****@email.com", d.getEmail());
|
||||
assertEquals("你好,我是*", d.getRegex());
|
||||
assertEquals("北京市海淀区上地十街10号*", d.getAddress());
|
||||
assertEquals("芋道源码", d.getOrigin());
|
||||
assertEquals("hhyykk", d.getOrigin());
|
||||
}
|
||||
|
||||
@Data
|
||||
@ -83,7 +83,7 @@ public class DesensitizeTest {
|
||||
private String slider3;
|
||||
@EmailDesensitize
|
||||
private String email;
|
||||
@RegexDesensitize(regex = "芋道源码", replacer = "*")
|
||||
@RegexDesensitize(regex = "hhyykk", replacer = "*")
|
||||
private String regex;
|
||||
@Address
|
||||
private String address;
|
||||
|
@ -20,7 +20,7 @@ public class AiKnowledgeDocumentRespVO extends PageParam {
|
||||
@Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "Java 是一门面向对象的语言.....")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "文档 url", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://doc.iocoder.cn")
|
||||
@Schema(description = "文档 url", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://hhyykk.cn")
|
||||
private String url;
|
||||
|
||||
@Schema(description = "token 数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
|
@ -19,7 +19,7 @@ public class AiKnowledgeDocumentCreateReqVO {
|
||||
@NotBlank(message = "文档名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "文档 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://doc.iocoder.cn")
|
||||
@Schema(description = "文档 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://hhyykk.cn")
|
||||
@URL(message = "文档 URL 格式不正确")
|
||||
private String url;
|
||||
|
||||
|
@ -10,7 +10,7 @@ import lombok.ToString;
|
||||
@Data
|
||||
public class BpmFormPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "表单名称", example = "芋道")
|
||||
@Schema(description = "表单名称", example = "hhyykk")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class BpmFormRespVO {
|
||||
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "hhyykk")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
@ -12,7 +12,7 @@ public class BpmFormSaveReqVO {
|
||||
@Schema(description = "表单编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "hhyykk")
|
||||
@NotNull(message = "表单名称不能为空")
|
||||
private String name;
|
||||
|
||||
|
@ -17,7 +17,7 @@ public class BpmUserGroupPageReqVO extends PageParam {
|
||||
@Schema(description = "编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "组名", example = "芋道")
|
||||
@Schema(description = "组名", example = "hhyykk")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user