diff --git a/README.md b/README.md index 7a2ec25..ec92278 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ > [设计目标](https://segmentfault.com/a/1190000020906742):面向开发人员的低代码开发平台,将重复性的工作自动化,提高质量、效率、可维护性。 ![diboot平台组成结构图](diboot-docs/.vuepress/public/structure.png) -diboot v2版本,目前实现: diboot-core全新内核 + diboot-devtools开发助理 + IAM身份认证、file文件处理等基础组件 + diboot-admin基础后台。 +diboot v2版本,目前实现: diboot-core全新内核 + diboot-devtools开发助理 + IAM身份认证、file文件处理等基础组件 + diboot-*-admin基础后台。 ## 一、 diboot-core: 精简优化内核 全新精简内核,(基于diboot-core 2.x版本的CRUD和简单关联的常规功能实现,代码量比1.x版本减少70%+),主要实现: @@ -40,7 +40,7 @@ diboot v2版本,目前实现: diboot-core全新内核 + diboot-devtools开发 #### 5. SQL与代码很标准(devtools标准化了数据结构定义与代码实现,降低维护成本) > [我要试试](https://www.diboot.com/guide/diboot-devtools/%E4%BB%8B%E7%BB%8D.html) -## 三、iam-base 身份认证基础组件 及 配套VUE前端框架(diboot-admin-antd、diboot-admib-element) +## 三、iam-base 身份认证基础组件 及 配套VUE前端框架(diboot-antd-admin、diboot-element-admin) #### 1. RBAC角色权限模型 + JWT的认证授权 实现,支持刷新token #### 2. 简化的BindPermission注解,支持兼容shiro的简化权限绑定与自动鉴权 diff --git a/diboot-core/src/main/java/com/diboot/core/util/BeanUtils.java b/diboot-core/src/main/java/com/diboot/core/util/BeanUtils.java index 658d375..c99756e 100644 --- a/diboot-core/src/main/java/com/diboot/core/util/BeanUtils.java +++ b/diboot-core/src/main/java/com/diboot/core/util/BeanUtils.java @@ -106,7 +106,7 @@ public class BeanUtils { } } catch (Exception e){ - log.warn("对象转换异常, class="+clazz.getName()); + log.warn("对象转换异常, class: {}, error: {}", clazz.getName(), e.getMessage()); } return resultList; } @@ -158,6 +158,10 @@ public class BeanUtils { log.warn("类型不一致,暂无法自动绑定,请手动转型一致后调用!字段类型: {} vs {} ", value.getClass().getTypeName(), fieldType); } } + // boolean vs Boolean + else if(value.getClass().getTypeName().equalsIgnoreCase(Boolean.class.getName()) && fieldType.equalsIgnoreCase(Boolean.class.getName())){ + //args[0] = (Boolean).valueOf(); + } // Integer 向上转型为 Long 绑定 else if(value.getClass().getTypeName().equals(Integer.class.getName()) && fieldType.equals(Long.class.getName())){ Integer intValue = (Integer)value; diff --git a/diboot-core/src/main/java/com/diboot/core/util/D.java b/diboot-core/src/main/java/com/diboot/core/util/D.java index b07051a..7f0dd67 100644 --- a/diboot-core/src/main/java/com/diboot/core/util/D.java +++ b/diboot-core/src/main/java/com/diboot/core/util/D.java @@ -36,7 +36,7 @@ public class D extends DateUtils{ /*** * 星期 */ - protected static final String[] WEEK = new String[]{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; + public static final String[] WEEK = new String[]{"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"}; /*** * 当前的日期时间 diff --git a/diboot-docs/guide/diboot-iam/介绍.md b/diboot-docs/guide/diboot-iam/介绍.md index 4867d70..a0aeaa6 100644 --- a/diboot-docs/guide/diboot-iam/介绍.md +++ b/diboot-docs/guide/diboot-iam/介绍.md @@ -17,4 +17,4 @@ > 组件包含了与此模型相关的后端代码,且依赖的数据结构在组件starter初次启动时将自动初始化。 -> 配套的前端基础框架有antd、element-ui,前端代码参考: diboot-admin-antd 及 diboot-admin-element \ No newline at end of file +> 配套的前端基础框架有antd、element-ui,前端代码参考: diboot-antd-admin 及 diboot-element-admin \ No newline at end of file diff --git a/diboot-file-starter/src/main/java/com/diboot/file/util/FileHelper.java b/diboot-file-starter/src/main/java/com/diboot/file/util/FileHelper.java index ca0180a..ca34209 100644 --- a/diboot-file-starter/src/main/java/com/diboot/file/util/FileHelper.java +++ b/diboot-file-starter/src/main/java/com/diboot/file/util/FileHelper.java @@ -189,11 +189,12 @@ public class FileHelper{ * 删除文件 * @param fileStoragePath */ - public static void deleteFile(String fileStoragePath) { + public static boolean deleteFile(String fileStoragePath) { File file = new File(fileStoragePath); if(file.exists()){ - file.delete(); + return file.delete(); } + return false; } } \ No newline at end of file diff --git a/diboot-file-starter/src/main/java/com/diboot/file/util/ZipHelper.java b/diboot-file-starter/src/main/java/com/diboot/file/util/ZipHelper.java index 5fd6977..9b58110 100644 --- a/diboot-file-starter/src/main/java/com/diboot/file/util/ZipHelper.java +++ b/diboot-file-starter/src/main/java/com/diboot/file/util/ZipHelper.java @@ -71,7 +71,6 @@ public class ZipHelper { continue; } } - childFileList[n].getAbsolutePath().indexOf(file.getAbsolutePath()); zipFile(srcRootDir, childFileList[n], zos, matchKeyword); } } diff --git a/iam-base-starter/README.md b/iam-base-starter/README.md index 5a6cb31..f4c2f02 100644 --- a/iam-base-starter/README.md +++ b/iam-base-starter/README.md @@ -1,5 +1,5 @@ # IAM-base: 身份认证组件 (基础版) -> 该组件配套的前端基础框架有antd、element-ui,前端代码参考: diboot-admin-antd 及 diboot-admin-element +> 该组件配套的前端基础框架有antd、element-ui,前端代码参考: diboot-antd-admin 及 diboot-element-admin ## 组件特性 * 开箱即用的RBAC角色权限模型 * 基于JWT的认证授权,支持申请token、刷新token diff --git a/iam-base-starter/src/main/java/com/diboot/iam/service/impl/IamUserRoleServiceImpl.java b/iam-base-starter/src/main/java/com/diboot/iam/service/impl/IamUserRoleServiceImpl.java index bcd852f..38572d8 100644 --- a/iam-base-starter/src/main/java/com/diboot/iam/service/impl/IamUserRoleServiceImpl.java +++ b/iam-base-starter/src/main/java/com/diboot/iam/service/impl/IamUserRoleServiceImpl.java @@ -95,11 +95,17 @@ public class IamUserRoleServiceImpl extends BaseIamServiceImpl) entityList).get(0); - clearUserAuthCache(entity.getUserType(), entity.getUserId()); + clearUserAuthCache(userType, userId); } return success; }