Project build error: 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-eureka-server:jar is missing

前端 未结 9 1828
既然无缘
既然无缘 2021-02-19 03:01

I am developing a code from https://www.dineshonjava.com/microservices-with-spring-boot/. When I update the spring-boot-starter-parent from 1.5.4.RELEASE to 2

9条回答
  •  一整个雨季
    2021-02-19 03:51

    There are a couple of things here. I was trying to create the Eureka server and I faced a couple of problems.

    First things

    If you are using spring-cloud-starter-eureka-server then change it to spring-cloud-starter-netflix-eureka-server.

    The link will give the details of the changes. https://github.com/spring-projects/spring-cloud/wiki/Spring-Cloud-Edgware-Release-Notes

    I recently created the starter project from https://start.spring.io/ and it has the latest changes in pom.xml

    This is how it looks like

    
     org.springframework.cloud
     spring-cloud-starter-netflix-eureka-client
    
    
    
     org.springframework.cloud
     spring-cloud-starter-netflix-eureka-server
    

    You need to make sure that the eureka server dependency version is correct. You can make sure by adding Greenwich.RELEASE in properties tag and ${spring-cloud.version} in dependencyManagement's version tag

    If you do not see the tag then add the whole dependency in your pom.xml

    
        1.8
         Greenwich.RELEASE
     
    
    	
    		
    			
    				org.springframework.cloud
    				spring-cloud-dependencies
    				${spring-cloud.version}
    				pom
    				import
    			
    		
    	

    I hope it helps.

提交回复
热议问题