Describe the bug

2023-08-10T22:33:54.718+08:00 DEBUG 21470 --- [nfoReplicator-0] o.a.h.c.http.impl.auth.BasicScheme : ex-0000000002 No credentials found for auth scope [Basic 'Realm' http://localhost:8761] 2023-08-10T22:33:54.718+08:00 DEBUG 21470 --- [nfoReplicator-0] o.s.web.client.RestTemplate : Response 401 UNAUTHORIZED

Sample

Eureka server config:

eureka.instance.hostname=localhost
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.service-url.defaultZone=http://${eureka.instance.hostname}:${server.port}/eureka/

spring.security.user.name=test
spring.security.user.password=123

Eureka Client Config:

eureka.client.service-url.defaultZone=http://test:123@localhost:8761/eureka

security version:

org.springframework.boot spring-boot-starter-security 3.1.2