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

场景

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

  • 启动模块中包含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

相关推荐

  • 切换数据库注意事项

    以下操作需注意: 手动定义columnDefinition导致重复执行ddl。如pgsql中decimal类型自动转换为numeric类型。 使用Mybatis Plus原生Page对象进行分页查询。 使用distinct/group by/join等查询导致分页报错。 启动创建数据库时未支持驱动参数。 场景 1:URL 缺少关键参数 场景 2:使用了不支持的 JDBC 驱动版本 数据库函数/数据库关键字意外识别为列导致的查询失败。 自定义sql查询时出现字段名称未正确映射为小驼峰字段导致的无法获取数据。

    2024年12月4日
    67600
  • 分部式缓存配置优化

    介绍 分布式缓存是为了解决以下2个场景 开发时,设计器和开发者本地业务工程同步元数据用的 多模块分部式部署架构 单机版的生产环境是不需要这个特性的,所以默认的启动配置不建议加分布式缓存的依赖包,只在开发环境开启即可 boot启动工程的pom.xml文件配置示例 <project> <profiles> <profile> <!– 下面配置的值根据 spring.profiles.active 识别 –> <id>dev</id> <!– 开发环境增加分布式依赖,支持设计器可以正确访问业务工程 –> <dependencies> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-faas</artifactId> </dependency> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-session</artifactId> </dependency> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-gateway</artifactId> </dependency> </dependencies> </profile> </profiles> </project>

    2024年7月10日
    1.0K00
  • 验证服务是否启动成功

    验证服务是否启动成功可以调用****/ruok接口,端口是服务器实际运行端口返回imok是启动成功,返回no是启动失败 @Order(Ordered.LOWEST_PRECEDENCE) @RestController public class HealthCheckController implements ApplicationListener<ApplicationStartedEvent> { private static boolean IM_OK = false; private static final String SUCCESS_STRING = "imok"; private static final String FAILURE_STRING = "no"; @GetMapping("/ruok") public String ruok() { if (IM_OK) { return SUCCESS_STRING; } return FAILURE_STRING; } @Override public void onApplicationEvent(ApplicationStartedEvent event) { IM_OK = true; } public static boolean imok() { return IM_OK; } }

    2024年9月27日
    84500
  • 低代码示例工程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.1K00
  • 后端初始化工程启动

    在拿到Oinone初始化的后端工程体验时,配置修改点

    2023年11月3日
    1.3K00

Leave a Reply

登录后才能评论