如何排查启动依赖错误的问题

场景

启动的时候可能会出现以下错误提示

  • 启动模块中包含jar包或者数据库中不存在的模块
  • 启动模块中包含不存在的模块
  • 启动模块互斥模块中包含已安装模块

排查项

  1. 确保启动工程的application.yml中的启动模块pamirs.boot.modules配置项内的模块在pom.xml内依赖了对应模块的jar包
    如何排查启动依赖错误的问题

  2. 确保出问题的模块的定义文件内的包扫描前缀packagePrefix方法内的路径定义正确,该路径可以是多个,但是一定要包含模块下所有子工程的路径,包括但不限于api子工程、core工程等,另外该路径也不能和其他模块的配置有重复、交集、包含关系(例如:a模块是 aa.bb.cc, b模块是aa.bb,这样b模块的路径就包含了a模块的)
    如何排查启动依赖错误的问题

  3. 启动类里spring自带的@ComponentScan.basePackages注解项需要包含所有依赖模块的路径
    如何排查启动依赖错误的问题

  4. 无代码应用创建的时候,配置了依赖模块。但这个依赖没有被本地安装,该模块就会出问题,要么删除该依赖,要么在代码里添加该依赖。

Oinone社区 作者:nation原创文章,如若转载,请注明出处:https://doc.oinone.top/install/backendinstall/14824.html

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

(0)
nation的头像nation数式员工
上一篇 2024年7月17日 pm6:12
下一篇 2024年7月19日 pm12:23

相关推荐

  • 【界面设计器】组件开发常见问题

    如何获取当前页面中的全部可用字段? 在Class Component(ts)中使用以下代码获取当前设计组件实例 “` tsimport { WidgetInstance } from &#039;@kunlun/ui-designer-dependencies&#039;; @Widget.Reactive()@Widget.Inject()protected currentInstance: WidgetInstance | undefined;“` PS:这里使用了@kunlun/ui-designer-dependencies依赖包中的类型定义,但没有使用函数,因此这个导入是可以正常执行的。 在Vue组件中使用以下代码获取可选字段列表 “` tsimport { WidgetInstance } from &#039;@kunlun/ui-designer-dependencies&#039;; // props add currentInstance defineprops: { currentInstance: { type: Object as PropType<WidgetInstance> }} // setup using currentInstance get fieldsconst fields = computed(() => { return Array.from(props.currentInstance?.root?.fieldCollection.values() || []).map((v) => { return { label: v.element?.widgetData?.displayName, value: v.element?.name }; });});“` PS:这里的v.element?.widgetData?.displayName获取的是字段的元数据显示名称,如果需要获取字段输入的标题可以使用v.element?.properties?.label。 为什么需要选择当前页面中的字段? 页面在发起请求时,会根据当前视图中的字段查询最小结果集,不在页面中的字段无法被正确获取。可以将用到的字段拖放至视图中,并使用【隐藏】属性进行隐藏即可。 列内容超过当前表格行高该怎么办? 在界面设计器中选中表格组件,可以为表格设置指定的行高。 在界面设计器的属性面板组件中,如何获取当前字段所在模型的模型编码? “` tsinterface InternalMetadata { model?: string;} @Widget.Reactive()protected get currentModel(): string | undefined { return (this.formData._metadata as InternalMetadata)?.model;}“` 在界面设计器的属性面板组件中,如何获取关联关系字段的关联模型的模型编码? “` tsinterface InternalMetadata { modelReferences?: { model?: string; };} @Widget.Reactive()protected get referenceModel(): string | undefined { return (this.formData._metadata as InternalMetadata)?.modelReferences?.model;}“` 如何理解关联关系字段中的【透出字段(选项字段列表)】属性? 正如我们现在已知的,页面发起查询请求时,将根据页面中的元数据获取最小结果集,不在页面中的字段并不包含在结果集中。这样虽然使得我们可以最小化的控制结果集的大小。 但对于关联关系类型的字段来说,我们也面临了一个无法回避的问题:对于【表格】、【表单】等这些组件,我们可以通过拖放字段的方式直接将字段展示在页面中,因此对于这些可被设计的组件而言无需其他过多的配置即可正常使用。但对于【下拉单选】、【下拉多选】等这些组件而言,我们无法在页面中直接定义关联关系字段的元数据。 我们在解决这一问题上也同样做了很多,比如当你在【下拉单选】中设置【选项标题】时,选项标题中的字段会被自动透出到页面中,在发起请求时也就能正常获取这些字段了。 特殊的是,如果某些字段只是在逻辑上被使用的,但又不能将其通过【选项标题】展示给用户的时候,我们必须使用一个属性来定义这些字段,使得我们的业务逻辑可以正常运行。因此,我们设计了【透出字段】来解决这一问题。 为什么在属性面板中的【选项字段列表】是【透出字段】呢? 正如我们在业务开发过程中,服务端的模型定义的显示名称和在界面设计器中的字段标题可以是不一致的。由于服务端模型定义的字段API名称为optionFields,其中文直译是【选项字段列表】,但我们在产品设计时,希望这一属性可以被用户理解,因此在页面上展示的时候使用了【透出字段】作为标题呈现给用户。 在界面设计器中如何配置【透出字段(选项字段列表)】? optionFields在配置时使用的是字段的API名称,在关联关系属性定义时,允许使用.分隔的方式定义关联关系字段的关联属性。 如:[‘code’, ‘name’, ‘user.code’, ‘user.name’]。其中user字段为多对一(M2O)的关联关系字段,其中有两个字段code和name。 与之对应的GQL响应结构为: query { xxxxxxQuery { queryPage(xxxxxx) { content { code name user { code name } } } } } 在界面设计器的属性面板组件中,如何通过代码方式设置【透出字段(选项字段列表)】? @Widget.Method() public setOptionFields(optionFields: string[]) { this.formData.optionFields = optionFields; } 如何在字段中使用mountedCallChaining提供mountedProcess方法? @Widget.Reactive() @Widget.Inject() protected mountedCallChaining: CallChaining | undefined; protected mountedProcess() {} protected mounted() { super.mounted(); this.mountedCallChaining?.hook(this.path, async () => { await this.mountedProcess(); }); } protected unmounted() { super.unmounted(); this.mountedCallChaining?.unhook(this.path); }

    2023年11月1日
    1.7K00
  • 组件问题

    2022年2月12日
    1.2K00
  • 东方通Web和Tomcat部署Oinone项目

    场景描述 在国产化和信创体系下,可能会要求使用东方通Web服务器(TongWeb)或者Tomcat等应用服务器部署项目;本文介绍使用TongWeb或者Tomcat部署Oinone项目时的方法。 你需要了解 了解Tomcat容器,TongWeb的操作基本和Tomcat类似; 项目打包成成war包和Jar的区别; Springboot项目打成war包 详细步骤参考:https://www.cnblogs.com/memoa/p/10250553.html TongWeb和Tomcat部署War包 TongWeb部署war包一般会有提供操作手册,这里不在说明; Tomcat部署war包可以参考网上的资料,这里不在说明; 本文仅说明部署Oinone打成的War包不同之处; Oinone项目War包部署 已知限制 Oinone项目在部署时,需要指定生命周期-Plifecycle=INSTALL等 而TongWeb和Tomcat无法在启动脚本中设置Program arguments 解法办法 通过yml文件的配置,可以配置等同于-Plifecycle=INSTALL的参数 pamirs: boot: init: true sync: true profile: AUTO install: AUTO upgrade: FORCE modules: 配置参考 配置参考 模块之启动指令 参数 名称 默认值 说明 -Plifecycle 生命周期部署指令 RELOAD 可选项:无/INSTALL/PACKAGE/RELOAD/DDL 安装(INSTALL) install为AUTO;upgrade为FORCE;profile为AUTO 打包(PACKAGE) install为AUTO;upgrade为FORCE;profile为PACKAGE 重启(RELOAD) install、upgrade、profile为READONLY 打印变更DDL(DDL) install为AUTO;upgrade为FORCE;profile为DDL

    2024年5月18日
    2.5K00
  • 低代码示例工程oinone-example启动说明

    运行低代码后端示例工程 1. 前置准备 1.1. 解压(部署.zip),找到后端工程oinone-example 1.2.下载idea以及安装平台的idea插件 1.2.1 jdk安装(已安装请忽略) 如本机环境没有安装jdk8(jdk1.8.221+),需先安装:mac:https://doc.oinone.top/oio4/9225.htmlwindow:https://doc.oinone.top/oio4/9226.html 1.2.2 idea的插件安装教程: mac:https://doc.oinone.top/oio4/9225.htmlwindows:https://doc.oinone.top/oio4/9226.html 1.2.3 maven下载安装(已安装请忽略) mvn下载地址,推荐安装3.6.3https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/mac:https://doc.oinone.top/oio4/9225.htmlwindows:https://doc.oinone.top/oio4/9226.html 2. 修改bootstrap.yml中运行环境配置 修改其中zk的IP:192.168.0.121->改成docker安装的宿主机IP默认profiles设置是dev,注意对应生效的yml文件为applicaiton-dev.yml spring: profiles: active: dev application: name: pamirs-project cloud: service-registry: auto-registration: enabled: false pamirs: default: environment-check: true tenant-check: true — spring: profiles: dev cloud: service-registry: auto-registration: enabled: false config: enabled: false uri: http://127.0.0.1:7001 label: master profile: dev nacos: server-addr: http://127.0.0.1:8848 discovery: enabled: false namespace: prefix: application file-extension: yml config: enabled: false namespace: prefix: application file-extension: yml dubbo: application: name: pamirs-project version: 1.0.0 registry: address: zookeeper://192.168.0.121:2182 protocol: name: dubbo port: 20880 serialization: pamirs consumer: timeout: 5000 provider: timeout: 5000 scan: base-packages: pro.shushi cloud: subscribed-services: 3. 修改application-dev.yml中对应中间件的IP和端口 3.1 redis 修改对应redis的IP端口以及密码 spring: redis: database: 0 host: 192.168.0.121 #改成docker安装的宿主机IP port: 6378 timeout: 5000 password: Abc@1234 3.2 mysql 如自行安装mysql,直接改成mysql的IP和账号信息如直接使用docker提供的mysql,则修改对应的IP为docker安装的宿主机IP biz: driverClassName: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://192.168.0.121:3307/demo_biz?useSSL=false&allowPublicKeyRetrieval=true&useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true username: root password: Abc@1234 initialSize: 5 maxActive: 200 minIdle: 5 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true asyncInit: true pamirs: driverClassName: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://192.168.0.121:3307/demo_pamirs?useSSL=false&allowPublicKeyRetrieval=true&useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true username: root password: Abc@1234 initialSize: 5 maxActive: 200 minIdle: 5 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements:…

    2023年11月11日
    3.7K00
  • 【PostgreSQL】后端部署使用PostgreSQL数据库

    PostgreSQL数据库配置 驱动配置 Maven配置(14.3版本可用) <postgresql.version>42.6.0</postgresql.version> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>${postgresql.version}</version> </dependency> 离线驱动下载 postgresql-42.2.18.jarpostgresql-42.6.0.jarpostgresql-42.7.3.jar JDBC连接配置 pamirs: datasource: base: type: com.alibaba.druid.pool.DruidDataSource driverClassName: org.postgresql.Driver url: jdbc:postgresql://127.0.0.1:5432/pamirs?currentSchema=base username: xxxxxx password: xxxxxx 连接url配置 暂无官方资料 url格式 jdbc:postgresql://${host}:${port}/${database}?currentSchema=${schema} 在jdbc连接配置时,${database}和${schema}必须完整配置,不可缺省。 其他连接参数如需配置,可自行查阅相关资料进行调优。 方言配置 pamirs方言配置 pamirs: dialect: ds: base: type: PostgreSQL version: 14 major-version: 14.3 pamirs: type: PostgreSQL version: 14 major-version: 14.3 数据库版本 type version majorVersion 14.x PostgreSQL 14 14.3 PS:由于方言开发环境为14.3版本,其他类似版本(14.x)原则上不会出现太大差异,如出现其他版本无法正常支持的,可在文档下方留言。 schedule方言配置 pamirs: event: enabled: true schedule: enabled: true dialect: type: PostgreSQL version: 14 major-version: 14.3 type version majorVersion PostgreSQL 14 14.3 PS:由于schedule的方言在多个版本中并无明显差异,目前仅提供一种方言配置。 其他配置 逻辑删除的值配置 pamirs: mapper: global: table-info: logic-delete-value: (EXTRACT(epoch FROM CURRENT_TIMESTAMP) * 1000000 + EXTRACT(MICROSECONDS FROM CURRENT_TIMESTAMP))::bigint PostgreSQL数据库用户初始化及授权 — init root user (user name can be modified by oneself) CREATE USER root WITH PASSWORD 'password'; — if using automatic database and schema creation, this is very important. ALTER USER root CREATEDB; SELECT * FROM pg_roles; — if using postgres database, this authorization is required. GRANT CREATE ON DATABASE postgres TO root;

    2023年11月1日
    1.5K00

Leave a Reply

登录后才能评论