创建eureka服务,sspringboot 版本2.0.0M3 springcloud版本是 Finchley.M2
1.创建步骤
点击next,
继续点击next,然后选择 Spring Cloud Discovery 勾选 Eureka Server ,然后spring boot版本选择高版本,我现在选择2.2.2
然后next
然后finish完成
2.修改版本号,增加配置
版本号修改完成后,还需要在pom.xml中添加如下配置才能生效
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
最后需要mvn clean package ,此次过程时间需要好久,请耐心等待。小编将高版本转换成这个版本也是花了一天的时间才处理好。
然后代码修改
代码https://github.com/chengda1992/springcloud.git