1. 程式人生 > >Springboot(Eureka)啟動異常:java.lang.NoSuchMethodError:【已解決】

Springboot(Eureka)啟動異常:java.lang.NoSuchMethodError:【已解決】

根本原因是parent 中的version 版本過高 現階段預設版本2.0.1 將版本改為1.4.0之後啟動正常 <version>選項卡中改動

<parent>

    <groupId>org.springframework.boot</groupId>

     <artifactId>spring-boot-starter-parent</artifactId>    

     <version>2.0.0.RELEASE</version>

     <relativePath/> <!-- lookup parent from repository -->

</parent>

還有一個需要改動的地方  或者說是需要注意的地方: <version>中的標籤 Dalston.SR4 指明 

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>Dalston.SR4</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

參考部落格:https://www.cnblogs.com/gudi/p/8644810.html  by 西門吹牛