springCloud之Eureka

xiaoxiao2021-02-28  19

依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka-server</artifactId> </dependency> yml配置文件 server: port: 1001 eureka: instance: hostname: localhost client: register-with-eureka: false fetch-registry: false service-url: defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/ 启动配置 @EnableEurekaServer

创建完成. 访问地址为:localhost:自己配置的端口号 注意的坑有defaultZone不能写成default-zone

转载请注明原文地址: https://www.6miu.com/read-2499974.html

最新回复(0)