springcloud-注册中心Eureka Server
1.版本说明
springboot 2.2.5.RELEASE
springcloud Hoxton.SR6
2.依赖
<!--引入eurekaserver组件的依赖--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> </dependency>
3.配置文件
server.port=8080 spring.application.name=eurekaserver eureka.client.service-url.defaultZone=http://localhost:8080/eureka eureka.client.fetch-registry=false eureka.client.register-with-eureka=false
4.启动注解
@SpringBootApplication @EnableEurekaServer public class EurekaserverApplication { public static void main(String[] args) { SpringApplication.run(EurekaserverApplication.class, args); } }