官方文档:Spring Cloud Netflix
https://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/2.2.2.RELEASE/reference/html/#spring-cloud-eureka-server
1、创建module
2、application.yml配置文件添加相关配置
server:
port: 8900
spring:
application:
name: eureka
eureka:
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://root:root@localhost:8900/eureka/
3、项目的pom打包方式修改
<packaging>pom</packaging>
4、模块启动类CloudEurekaApplication.java添加注解@EnableEurekaServer