Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

63.4. 为 Eureka Server 增加用户认证

63.4.1. Maven

				
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>				
				
			

63.4.2. application.properties

				security.user.name=eureka
				security.user.password=s3cr3t
			

63.4.3. Eureka Client

				spring.application.name=restful-api-service
				eureka.client.serviceUrl.defaultZone=http://eureka:s3cr3t@localhost:8761/eureka/
			

63.4.4. Feign Client

				eureka.client.serviceUrl.defaultZone=http://eureka:s3cr3t@localhost:8761/eureka/