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(a)gmx.net)
http://www.ahus1.de