Boot微服务依赖于Jenkins中的另一个微服务

Boot微服务依赖于Jenkins中的另一个微服务

本文介绍了Spring Boot微服务依赖于Jenkins中的另一个微服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了两个Springboot michroservices,分别是service1和service2.具有service1依赖项的service2微服务.

I have developed two Springboot michroservices ex- service1 and service2. service2 microservice having dependency of service1.

我在service2 pom文件中添加了service1的依赖关系,并且在运行service2时在eclipse中可以正常工作.但是,当我在Jenkins中部署并为service1创建项目(Jenkins Job)并以maven目标全新安装"运行时,项目构建成功.

I've added dependency of service1 in service2 pom file and working expected in eclipse while running service2. but when I deployed in Jenkins and I've created project(Jenkins Job) for service1 and ran with maven goal 'clean install', project builds successfully.

当我为service2创建项目(Jenkins Job)并运行Jenkins Job时,构建失败,因为service2无法找到service1的依赖项.

When I created project(Jenkins Job) for service2 and running the Jenkins Job, build is failing because service2 is not able to find the dependency of service1.

推荐答案

问题已解决!!!每当我们在依赖项目中使用spring依赖项时,就不需要添加maven/spring编译器插件.

Issue Resolved!!! whenever we are using spring dependency in depedent project we don't need to add maven/spring compiler plug-in.

这篇关于Spring Boot微服务依赖于Jenkins中的另一个微服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 13:41