From c2692cc0ac26e4c7f5d5046f0c3a291865c93a1a Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sun, 2 Oct 2016 17:20:40 +0200 Subject: [PATCH] KEYCLOAK-2977: fix re-binding problem with spring-cloud --- .../springboot/KeycloakSpringBootProperties.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootProperties.java b/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootProperties.java index 95bdf46acc..f196cf6cb1 100644 --- a/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootProperties.java +++ b/adapters/oidc/spring-boot/src/main/java/org/keycloak/adapters/springboot/KeycloakSpringBootProperties.java @@ -17,15 +17,27 @@ package org.keycloak.adapters.springboot; +import com.fasterxml.jackson.annotation.JsonIgnore; import org.keycloak.representations.adapters.config.AdapterConfig; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; @ConfigurationProperties(prefix = "keycloak", ignoreUnknownFields = false) public class KeycloakSpringBootProperties extends AdapterConfig { + /* this is a dummy property to avoid re-rebinding problem with property keycloak.config.resolver + when using spring cloud - see KEYCLOAK-2977 */ + @JsonIgnore + private Map config = new HashMap(); + + public Map getConfig() { + return config; + } + private List securityConstraints = new ArrayList(); public static class SecurityConstraint {