更新注释

This commit is contained in:
mazhicheng 2020-01-14 20:46:41 +08:00
parent bce518f3ec
commit 4eae8a1469
86 changed files with 102 additions and 94 deletions

View File

@ -22,7 +22,7 @@ import java.util.List;
/**
* DibootCore自动配置类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/08/01
*/

View File

@ -4,7 +4,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* diboot-core配置文件类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/08/06
*/

View File

@ -25,7 +25,7 @@ import java.util.Map;
/**
* SQL处理类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/08/01
*/

View File

@ -18,7 +18,7 @@ import java.util.List;
/**
* QueryWrapper构建器 - EntityDTO -> 注解绑定查询条件 并转换为QueryWrapper对象
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/07/27
*/

View File

@ -29,7 +29,7 @@ import java.util.Map;
/**
* 绑定管理器
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/7/18
*/

View File

@ -3,7 +3,7 @@ package com.diboot.core.binding.annotation;
import java.lang.annotation.*;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/21
*/

View File

@ -4,7 +4,7 @@ import java.lang.annotation.*;
/**
* 绑定Entity 注解定义
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/21
*/

View File

@ -3,7 +3,7 @@ package com.diboot.core.binding.annotation;
import java.lang.annotation.*;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/21
*/

View File

@ -3,7 +3,7 @@ package com.diboot.core.binding.annotation;
import java.lang.annotation.*;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/21
*/

View File

@ -19,7 +19,7 @@ import java.util.Map;
/**
* 关系绑定Binder父类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/19
*/

View File

@ -16,7 +16,7 @@ import java.util.Map;
/**
* Entity实体绑定Binder用于绑定当前一个entity到目标对象的属性
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/19
*/

View File

@ -15,7 +15,7 @@ import java.util.Map;
/**
* Entity集合绑定实现
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/19
*/

View File

@ -10,7 +10,7 @@ import java.util.*;
/**
* 关联字段绑定
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/19
*/

View File

@ -11,7 +11,7 @@ import java.util.List;
/**
* VO绑定注解的归类分组用于缓存解析后的结果
* @author Mazhicheng<br>
* @author mazc@dibo.ltd<br>
* @version 1.0<br>
* @date 2019/04/03 <br>
*/

View File

@ -13,7 +13,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* VO对象中的绑定注解 缓存管理类
* @author Mazhicheng<br>
* @author mazc@dibo.ltd<br>
* @version 1.0<br>
* @date 2019/04/03 <br>
*/

View File

@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* 条件表达式的管理器
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/4/1
*/

View File

@ -15,7 +15,7 @@ import java.util.List;
/**
* 关联注解条件解析器
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/3/30
*/

View File

@ -5,7 +5,7 @@ import java.lang.annotation.Annotation;
/**
* 字段名与注解的包装对象关系 <br>
*
* @author Mazhicheng<br>
* @author mazc@dibo.ltd<br>
* @version 1.0<br>
* @date 2019/04/04 <br>
*/

View File

@ -13,7 +13,7 @@ import java.util.Map;
/**
* 中间表
* @author Mazhicheng<br>
* @author mazc@dibo.ltd<br>
* @version 1.0<br>
* @date 2019/04/01 <br>
*/

View File

@ -2,7 +2,7 @@ package com.diboot.core.binding.query;
/**
* 比较条件枚举类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/08/06
*/

View File

@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
/***
* 系统默认配置
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -2,7 +2,7 @@ package com.diboot.core.config;
/**
* 基础常量定义
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -15,7 +15,7 @@ import java.util.*;
/***
* Controller的父类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -25,7 +25,7 @@ import java.util.Map;
/***
* CRUD增删改查通用RestController-父类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -13,7 +13,7 @@ import java.util.Map;
/**
* Entity基础父类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/27
*/

View File

@ -9,7 +9,7 @@ import java.util.Map;
/**
* 附带extdata扩展字段的Entity父类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/27
*/

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull;
/**
* 数据字典实体
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/27
*/

View File

@ -22,7 +22,7 @@ import java.util.Map;
/**
* 全局异常统一处理的默认实现
* 继承自该类并添加@ControllerAdvice注解即可自动支持兼容页面和JSON的异常处理
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/07/19
*/

View File

@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 基础CRUD的父类Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/22
*/

View File

@ -5,7 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
/**
* 数据字典Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/22
*/

View File

@ -2,7 +2,7 @@ package com.diboot.core.plugin;
/**
* 插件管理器
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/10/23
*/

View File

@ -15,7 +15,7 @@ import java.util.Map;
/**
* 基础服务Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -10,7 +10,7 @@ import java.util.List;
/**
* 数据字典Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -28,7 +28,7 @@ import java.util.*;
/***
* CRUD通用接口实现类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @param <M> mapper类
* @param <T> entity类
* @version 2.0

View File

@ -25,7 +25,7 @@ import java.util.Set;
/**
* 数据字典相关service实现
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -26,7 +26,7 @@ import java.util.stream.Collectors;
/**
* Bean相关处理工具类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -23,7 +23,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* Spring上下文帮助类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -13,7 +13,7 @@ import java.util.Date;
/**
* 提供常用的日期操作的工具类
* @author MaZhicheng
* @author mazc@dibo.ltd
* @version 2.0
* @date 2019/01/01
*/

View File

@ -8,7 +8,7 @@ import java.util.Date;
/**
* Spring表单自动绑定到Java属性时的日期格式转换
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -12,7 +12,7 @@ import java.util.concurrent.ConcurrentHashMap;
/**
* 加解密工具类 提供AES加解密
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/
@ -24,10 +24,6 @@ public class Encryptor {
*/
private static final String KEY_ALGORITHM = "AES";
private static final String CIPHER_ALGORITHM = "AES/ECB/PKCS5PADDING";
/**
* 默认加密seed可通过配置文件
*/
private static final String KEY_DEFAULT = V.notEmpty(BaseConfig.getProperty("diboot.encryptor.seed"))? BaseConfig.getProperty("diboot.encryptor.seed") : "DibootV2";
private static final String KEY_FILL = "abcdefghijklmnop";
@ -48,7 +44,7 @@ public class Encryptor {
* @throws Exception
*/
public static String encrypt(String input, String... key){
String seedKey = V.notEmpty(key)? key[0] : KEY_DEFAULT;
String seedKey = V.notEmpty(key)? key[0] : getDefaultKey();
try{
Cipher cipher = getEncryptor(seedKey);
byte[] enBytes = cipher.doFinal(input.getBytes());
@ -71,7 +67,7 @@ public class Encryptor {
if(V.isEmpty(input)){
return input;
}
String seedKey = V.notEmpty(key)? key[0] : KEY_DEFAULT;
String seedKey = V.notEmpty(key)? key[0] : getDefaultKey();
try{
Cipher cipher = getDecryptor(seedKey);
byte[] deBytes = Base64.getDecoder().decode(input.getBytes());
@ -128,7 +124,7 @@ public class Encryptor {
*/
private static byte[] getKey(String seed){
if(V.isEmpty(seed)){
seed = KEY_DEFAULT;
seed = getDefaultKey();
}
if(seed.length() < 16){
seed = seed + S.cut(KEY_FILL, 16-seed.length());
@ -139,4 +135,11 @@ public class Encryptor {
return seed.getBytes();
}
/**
* 默认加密seed可通过配置文件
*/
private static String getDefaultKey(){
String defaultKey = BaseConfig.getProperty("diboot.encryptor.seed");
return V.notEmpty(defaultKey)? defaultKey : "DibootV2";
}
}

View File

@ -4,7 +4,7 @@ import java.io.Serializable;
/**
* getter方法接口定义
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/15
*/

View File

@ -4,7 +4,7 @@ import java.io.Serializable;
/**
* setter方法接口定义
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/17
*/

View File

@ -12,7 +12,7 @@ import java.util.Map;
/***
* JSON操作辅助类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -1,17 +1,18 @@
package com.diboot.core.util;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
/**
* 配置文件工具类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/
@Slf4j
public class PropertiesUtils {
private static final Logger log = LoggerFactory.getLogger(PropertiesUtils.class);
/**
* Spring配置环境变量
@ -28,6 +29,10 @@ public class PropertiesUtils {
if(environment == null){
environment = ContextHelper.getApplicationContext().getEnvironment();
}
if(environment == null){
log.warn("无法获取上下文Environment !");
return null;
}
String value = environment.getProperty(key);
// 任何password相关的参数需解密
boolean isSensitiveConfig = key.contains(".password") || key.contains(".secret");

View File

@ -11,7 +11,7 @@ import java.util.UUID;
/***
* String 操作类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -16,7 +16,7 @@ import java.util.Map;
/**
* 原生SQL执行类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/31
*/

View File

@ -10,7 +10,7 @@ import java.util.*;
/***
* Validator校验类
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*

View File

@ -7,7 +7,7 @@ import java.io.Serializable;
/**
* JSON返回结果
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -8,7 +8,7 @@ import java.io.Serializable;
/**
* KeyValue键值对形式的VO用于构建显示名Name-存储值Value形式的结果
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/4
*/

View File

@ -20,7 +20,7 @@ import java.util.List;
/**
* 分页 (属性以下划线开头以避免与提交参数字段冲突)
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -10,7 +10,7 @@ import java.util.List;
/**
* JSON返回结果
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -2,7 +2,7 @@ package com.diboot.core.vo;
/**
* 状态码定义
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/01/01
*/

View File

@ -21,7 +21,7 @@ import java.util.List;
/**
* 测试字段绑定
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -25,7 +25,7 @@ import java.util.List;
/**
* 测试字段绑定
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -23,7 +23,7 @@ import java.util.List;
/**
* 测试字段绑定
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -8,7 +8,7 @@ import lombok.experimental.Accessors;
/**
* 定时任务
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/27
*/

View File

@ -8,7 +8,7 @@ import lombok.experimental.Accessors;
/**
* 单位Entity
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/5
*/

View File

@ -9,7 +9,7 @@ import lombok.experimental.Accessors;
import java.util.Date;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/30
*/

View File

@ -7,7 +7,7 @@ import lombok.Setter;
import lombok.experimental.Accessors;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/30
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Department;
/**
* 部门Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/22
* Copyright © www.dibo.ltd
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Organization;
/**
* 单位Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/22
* Copyright © www.dibo.ltd
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Role;
/**
* 员工Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/22
* Copyright © www.dibo.ltd
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.User;
/**
* 员工Mapper
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/22
* Copyright © www.dibo.ltd
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Department;
/**
* 部门相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/30
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Organization;
/**
* 单位相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/5
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.Role;
/**
* 角色相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/5
*/

View File

@ -5,7 +5,7 @@ import diboot.core.test.binder.entity.User;
/**
* 员工相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/5
*/

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
/**
* 部门相关Service实现
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/30
*/

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
/**
* 单位相关Service实现
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/23
* Copyright © www.dibo.ltd
*/

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
/**
* 员工相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/23
* Copyright © www.dibo.ltd
*/

View File

@ -8,7 +8,7 @@ import org.springframework.stereotype.Service;
/**
* 员工相关Service
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 2018/12/23
* Copyright © www.dibo.ltd
*/

View File

@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
/**
* 定时任务
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2018/12/27
*/

View File

@ -6,7 +6,7 @@ import diboot.core.test.binder.entity.Organization;
import diboot.core.test.binder.entity.User;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/30
*/

View File

@ -9,7 +9,7 @@ import java.util.List;
/**
* <Description>
*
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -6,7 +6,7 @@ import diboot.core.test.binder.entity.Department;
import java.util.List;
/**
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/1/5
*/

View File

@ -9,7 +9,7 @@ import diboot.core.test.binder.entity.User;
/**
* <Description>
*
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -3,7 +3,7 @@ package diboot.core.test.binder.vo;
/**
* <Description>
*
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/12/06
*/

View File

@ -7,7 +7,7 @@ import diboot.core.test.binder.entity.User;
/**
* <Description>
*
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/22
*/

View File

@ -23,7 +23,7 @@ import java.util.List;
/***
* Spring配置文件
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/6/10
*/

View File

@ -30,7 +30,7 @@ import java.util.List;
/**
* BaseService接口实现测试 (需先执行example中的初始化SQL)
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/15
*/

View File

@ -14,7 +14,7 @@ import java.util.Map;
/**
* BeanUtils测试
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version v2.0
* @date 2019/06/02
*/

View File

@ -10,7 +10,7 @@ import java.util.Date;
/**
* 日期单元测试
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 1.0
* @date 2019/06/02
*/

View File

@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringRunner;
/**
* <Description>
*
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 1.0
* @date 2019/06/02
*/

View File

@ -12,7 +12,7 @@ import org.springframework.test.context.junit4.SpringRunner;
/**
* 配置文件读取测试
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 1.0
* @date 2019/06/02
*/

View File

@ -6,7 +6,7 @@ import org.junit.Test;
/**
* S工具类测试
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 1.0
* @date 2019/06/02
*/

View File

@ -10,7 +10,7 @@ import java.util.List;
/**
* V校验工具类测试
* @author Mazhicheng
* @author mazc@dibo.ltd
* @version 1.0
* @date 2019/06/02
*/