Example keycloak spring-boot app fails to find bean KeycloakSpringBootConfigResolver

后端 未结 2 847
北荒
北荒 2020-12-15 05:01

I\'m trying to run example app from:

https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-springboot

I\'m getting error:

********         


        
2条回答
  •  庸人自扰
    2020-12-15 05:35

    Thomas answer did work for me. The keycloak spring boot properties class had to be enabled manually though, by annotating the Application class like this:

    @EnableConfigurationProperties(KeycloakSpringBootProperties.class)
    

    Furthermore the custom keycloak spring boot config resolver bean must be overriden explicitly.

    @Bean
    @Primary
    public KeycloakConfigResolver keycloakConfigResolver(KeycloakSpringBootProperties properties) {
          return new MyKeycloakSpringBootConfigResolver(properties);
    }
    

提交回复
热议问题