新增模块不存在

后端代码新增了一个模块,但在前端看不到新增的模块,主要排查以下几个方面

  1. 检查启动参数中是否添加-Plifecycle=INSTALL
  2. 启动工程的yml文件中在pamirs: boot: modules: 中是否添加了该模块
  3. 启动工程的pom文件是否依赖该该模块所在包
  4. 检查启动工程是否扫描到了该模块所在包

新增模块不存在
新增模块不存在

Oinone社区 作者:yexiu原创文章,如若转载,请注明出处:https://doc.oinone.top/wen-ti-zhen-duan/14865.html

访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验

(1)
yexiu的头像yexiu数式员工
上一篇 2024年7月23日 pm5:35
下一篇 2024年7月24日 am9:52

相关推荐

  • 前端打包后运行报错: locale is undefined

    前端 monorepo 工程打包的时候可能会遇到如下报错: 解决方案分为四步: 下载这个build脚本,并放到 scripts 目录下,需要解压下载地址 修改 boot 工程的 package.json, 为 scripts 属性添加这两行命令 "prebuild": "node ../../scripts/build/prebuild-only.js", "postbuild": "node ../../scripts/build/postbuild.js", 在根目录执行 pnpm run clean,删除依赖,如果是windows电脑,执行 pnpm run clean:win 重新安装依赖pnpm install,再回到 boot 工程,执行 pnpm run build

    2025年7月18日
    21200
  • 保存多值字段SQL执行报错

    定义多值类型时,字段类型应该设置为List类型。 @Field.String @Field(displayName ="经费证明", multi = true, serialize = Field.serialize.JSON) private List<String> matchFund; 场景复现

    2024年8月30日
    65800
  • 序列化工具使用问题

    后端使用的JSON序列化JsonUtils.toJSONString(nodes);前端使用的JSON序列化PamirsJsonUtils.toJSONString(nodes, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteDateUseDateFormat, SerializerFeature.BrowserCompatible);注意:用什么工具序列化,就用什么工具反序列化、parse 的时候,要保持一致, 使用PamirsJsonUtils序列化工具主要是为了解决枚举取值错误的问题以及id精度丢失问题。当出现这两个问题的时候,需要使用PamirsJsonUtils 进行序列化。

    2024年9月5日
    95500
  • 树表查不到二级目录

    场景:树表结构查不到二级模型内容,联动配置如下 问题:界面只显示部门,不显示岗位。 已知: 自定义部门代理模型继承了PamirsDepartment @Model.model(DepartmentDoc.MODEL_MODEL) @Model.Advanced(type = ModelTypeEnum.PROXY) @Model(displayName = “部门资料代理模型”, summary = “部门资料代理模型”) public class DepartmentDoc extends PamirsDepartment { public static final String MODEL_MODEL = “top.DepartmentDoc”; @Field.many2one @Field(displayName = “上级部门”) private DepartmentDoc parent; @Field.one2many @Field(displayName = “岗位列表”) private List positionLists; } 自定义岗位代理模型继承了PamirsPosition @Model.model(PositionDoc.MODEL_MODEL) @Model(displayName = “岗位代理模型”, summary = “岗位代理模型”) @Model.Advanced(type = ModelTypeEnum.PROXY) public class PositionDoc extends PamirsPosition { public static final String MODEL_MODEL = “top.PositionDoc”; @Field.many2one @Field(displayName = “上级岗位”) private PositionDoc parent; } 首先查看控制台相应请求 找到请求接口进后端debug,pro.shushi.pamirs.boot.web.action.UiTreeAction#fetchChildren 检查这两个数据是否正常 继续debug可知,在queryWrapper中使用departmentCode没有查询出数据,这时候回看模型定义,发现岗位列表中没有定义关联字段,导致没有查出数据。pro.shushi.pamirs.boot.web.manager.tree.UiTreeRelationQueryManager#_fetchIsLeaf 解决:在模型配置中添加关系字段@Field.Relation(relationFields = {"code"}, referenceFields = {"departmentCode"}),并和父类中的关系字段保持一致 部门代理模型: @Model.model(DepartmentDoc.MODEL_MODEL) @Model.Advanced(type = ModelTypeEnum.PROXY) @Model(displayName = "部门资料代理模型", summary = "部门资料代理模型") public class DepartmentDoc extends PamirsDepartment { public static final String MODEL_MODEL = "top.DepartmentDoc"; @Field.many2one @Field.Relation(relationFields = {"parentCode"}, referenceFields = {"code"}) @Field(displayName = "上级部门") private DepartmentDoc parent; @Field.one2many @Field.Relation(relationFields = {"code"}, referenceFields = {"departmentCode"}) @Field(displayName = "岗位列表") private List<PositionDoc> positionLists; } 岗位代理模型 @Model.model(PositionDoc.MODEL_MODEL) @Model(displayName = "岗位代理模型", summary = "岗位代理模型") @Model.Advanced(type = ModelTypeEnum.PROXY) public class PositionDoc extends PamirsPosition { public static final String MODEL_MODEL = "top.PositionDoc"; @Field.many2one @Field.Relation(relationFields = {"departmentCode"}, referenceFields = {"code"}) @Field(displayName = "上级岗位") private PositionDoc parent; }

    2024年7月23日
    60100
  • 函数如何跳过权限拦截

    跳过登录直接调用接口 示例: 跳过queryTea的权限验证 @Action(displayName = "queryTea", bindingType = ViewTypeEnum.FORM) @Action.Advanced(type = FunctionTypeEnum.UPDATE) public Teacher queryTea(Teacher data) { } 在yaml文件里面配置上该函数的namespace(模型编码)以及函数名字 pamirs: auth: fun-filter: – namespace: user.PamirsUserTransient fun: login #登录 – namespace: top.Teacher fun: queryTea 不跳过登录直接调用接口 示例: 在yaml文件里面配置上该函数的namespace(模型编码)以及函数名字 pamirs: auth: fun-filter-only-login: #登录后不再校验该函数的权限 – namespace: top.Teacher fun: queryTea 按包设置权限过滤 如何批量跳过权限验证?以上两种方式提供了在yml文件里面配置权限过滤的方式,但如果需要大量过滤权限,配置就变得很繁琐,所以下面主要介绍通过代码扩展的方式去控制权限。 示例: 以下示例通过控制包路径来跳过权限。 继承pro.shushi.pamirs.auth.api.spi.AuthFilterService接口 import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; @Order(88) @Component public class CustomAuthFilterService implements AuthFilterService { public static final String skipClass = "pro.shushi.pamirs.top.core.action"; @Override public Boolean isAccessAction(String model, String name) { //从缓存中取函数 Action cacheAction = PamirsSession.getContext().getExtendCache(ActionCacheApi.class).get(model, name); if (cacheAction instanceof ServerAction) { ServerAction serverAction = (ServerAction) cacheAction; Function function = PamirsSession.getContext().getFunction(serverAction.getModel(), serverAction.getFun()); String clazz = function.getClazz(); //返回true就代表通过验证 if (clazz != null && clazz.startsWith(skipClass)) { return true; } } return null; } } 请求pro.shushi.pamirs.top.core.action路径下的动作可以通过验证。

    2024年8月22日
    1.0K00

Leave a Reply

登录后才能评论