Spring Cloud 2.1.3 配置安全认证

2019-04-05  本文已影响0人  16813153e52b

Authenticating with the Eureka Server

Spring Cloud Version
<spring-cloud.version>Greenwich.SR1</spring-cloud.version>

  1. 添加security依赖
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
  1. 添加spring security配置在application.yml
spring:
  security:
    user:
      name: admin
      password: admin123
上一篇 下一篇

猜你喜欢

热点阅读