Spring Cloud 의 구형 Spring Security 인증 유레카 서비스 발견 및 서비스 등록 설정
1961 단어 SpringCloud
pom 파일 에 설 정 된 spring - boot 버 전:
org.springframework.boot
spring-boot-starter-parent
1.5.4.RELEASE
org.springframework.cloud
spring-cloud-starter-eureka-server
1.3.6.RELEASE
org.springframework.boot
spring-boot-starter-security
서버:
security:
basic:
enabled: true
user:
name: user
password: password123
server:
port: 8761
# eureka-Server eureka Client[ eureka-Server eureka-Client]
eureka:
client:
register-with-eureka: false
fetch-registry: false
service-url:
defaultZone: http://user:password123@localhost:8761/eureka
클 라 이언 트:
server:
port: 8082
spring:
application:
name: client-demo
eureka:
client:
healthcheck:
enabled: true
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true # eureka IP
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}}
서버 와 클 라 이언 트 구축
참고:
유레카 서버 구축:https://blog.csdn.net/weixin_42465125/article/details/88233722
클 라 이언 트 구축:https://blog.csdn.net/weixin_42465125/article/details/88337698
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *