Posts Eureka注册中心设置用户名密码
Post
Cancel

Eureka注册中心设置用户名密码

  1. 加入安全认证依赖 ```xml
org.springframework.boot spring-boot-starter-security
1
2
3
4
2. 在application.properties加入认证的用户名和密码
```properties
security.user.name=你的用户名
security.user.password=你的密码
  1. 修改url注册
    1
    
    eureka.client.serviceUrl.defaultZone=http://${security.user.name}:${security.user.password}@127.0.0.1:${server.port}/eureka/
    
This post is licensed under CC BY 4.0 by the author.