此项目目前为3级springboot开发,maven工程,建立过程参考以前的博文。出现问题的模块结构如图:前端
我在’ly-item-service’子模块中引入同级的模块’ly-item-interface’依赖,pom.xml依赖以下:git
... <dependency> <groupId>com.leyou.service</groupId> <artifactId>ly-item-interface</artifactId> <version>1.0.0-SNAPSHOT</version> </dependency> ...
运行’ly-item-service’子模块中启动类,报错:web
Failed to execute goal on project ly-item-service: Could not resolve dependencies for project com.leyou.service:ly-item-service:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at com.leyou.service:ly-item-interface:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for com.leyou.service:ly-item-interface:jar:1.0.0-SNAPSHOT: Could not find artifact com.leyou.parent:leyou:pom:1.0.0-SNAPSHOT -> [Help 1]
图示:spring
从根工程开始,把相关的工程,经过maven install一下,若是install 根工程没解决,在install 安装下一级父模块,以此类推。后端
再次运行启动类正常,如图:springboot
在多级多模块springboot maven工程中,若是由于引用自定义模块依赖出现问题,那么就把相关模块及父模块(工程)install一下,前提的配置没问题。maven
本项目为参考某马视频开发,相关视频及配套资料可自行度娘或者联系本人。上面为本身编写的开发文档,持续更新。欢迎交流,本人QQ:806797785ide
前端项目源代码地址:https://gitee.com/gaogzhen/ly-bms // 前端后台管理系统 后端JAVA源代码地址:https://gitee.com/gaogzhen/ly-backend // 后端项目