版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_23140197/article/details/85156556
使用的Spring旗下的STS作为开发IDE,Eureka是Spring Cloud微服务组件的一部分,是用于实现服务注册和发现的工具。
在STS中直接new 一个Spring starter Project
默认配置
选择 eureka Server 添加组件
创建成功项目后修改application.properties配置 文件
server.port=11111
eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
在启动服务上 添加@EnableEurekaServer 注解
启动服务 访问http://localhost:11111/ 即可