[keycloak-dev] Proposed solution for Keycloak/Spring Cloud conflict / KEYCLOAK-2977

Alexander Schwartz alexander.schwartz at gmx.net
Mon Aug 29 08:11:57 EDT 2016


Dear Keycloak Developers,
 
I've been looking into https://issues.jboss.org/browse/KEYCLOAK-2977 that that describes that Keycloak works with Spring Boot, but not with Spring Cloud.

I found the source of the problem:
 
KeycloakSpringBootConfiguration places the key keycloak.config.resolver in the servlet context, and apparently it this is enough for Spring to pick it up and use it alongside with all the values in application.properties.

Due to this Spring tries to set the properties keycloak.config.resolver (interpreted as config[resolver] on bean keycloak). This doesn't exist, and due to the setting ignoreUnknownFields = false on KeycloakSpringBootProperties this leads to the observed NotWritablePropertyException.

Suggested change (as a workaround): set ignoreUnknownFields = true, so Spring will be allowed to ignore the property. 

Please comment. If I'll get a "+1" on this, I'll prepare a pull request.

Regards,
Alexander
 
--
Alexander Schwartz (alexander.schwartz at gmx.net)
http://www.ahus1.de



More information about the keycloak-dev mailing list