eureka注册中心设置用户密码

1、pom.xml增加依赖:

<!--为eureka配置账号密码-->

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-security</artifactId>

</dependency>

2、配置文件里配置账号名密码,(application.properties或application.yml)

application.properties:

security.basic.enabled= true

security.user.name=username

扫描二维码关注公众号,回复: 3599591 查看本文章

security.user.password=passwd

为客户端引入账号与密码

eureka.client.serviceUrl.defaultZone=http://username:passwd@localhost:8765/eureka/

3、接下来输入

好了,若有疑问请联系183942498 微信qq同号,谢谢您。

猜你喜欢

转载自blog.csdn.net/oceanyang520/article/details/83107233
今日推荐