diff --git a/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/config/SpringBootAdminClientAutoConfiguration.java b/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/config/SpringBootAdminClientAutoConfiguration.java index 31170899fe9..bc568660c04 100644 --- a/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/config/SpringBootAdminClientAutoConfiguration.java +++ b/spring-boot-admin-client/src/main/java/de/codecentric/boot/admin/client/config/SpringBootAdminClientAutoConfiguration.java @@ -139,8 +139,8 @@ public static class BlockingRegistrationClientConfig { @Bean @ConditionalOnMissingBean public RegistrationClient registrationClient(ClientProperties client) { - RestTemplateBuilder builder = new RestTemplateBuilder().setConnectTimeout(client.getConnectTimeout()) - .setReadTimeout(client.getReadTimeout()); + RestTemplateBuilder builder = new RestTemplateBuilder().connectTimeout(client.getConnectTimeout()) + .readTimeout(client.getReadTimeout()); if (client.getUsername() != null && client.getPassword() != null) { builder = builder.basicAuthentication(client.getUsername(), client.getPassword());