spring-cloud-eureka
一、注册Eureka-Server服务
- 添加依赖
- spring-cloud-starter-eureka-server
- spring-boot-starter-security (添加密码配置)
启动类添加注解
- @EnableEurekaServer
配置application.properties | application.yml文件
security: basic: enabled: true user: name: user password: password123 server: port: 8761 eureka: client: healthcheck: enabled: true register-with-eureka: false fetch-registry: false service-url: defaultZone: http://user:password123@localhost:8761/eureka
- 启动
- 打开浏览器 输入 http://localhost:8761/