keycloak resource fix

This commit is contained in:
ialbert 2022-08-03 13:40:30 +03:00
parent 3ecca8986c
commit a0084ee3fb

View file

@ -27,7 +27,7 @@ public class KeycloakJsonSettingConfig {
@Bean @Bean
public KeycloakConfigResolver keycloakConfigResolver() throws IOException { public KeycloakConfigResolver keycloakConfigResolver() throws IOException {
ObjectMapper json = new ObjectMapper(); ObjectMapper json = new ObjectMapper();
AdapterConfig adapterConfig = json.readValue(keycloakJson.getFile(), AdapterConfig.class); AdapterConfig adapterConfig = json.readValue(keycloakJson.getInputStream(), AdapterConfig.class);
KeycloakDeployment build = KeycloakDeploymentBuilder.build(adapterConfig); KeycloakDeployment build = KeycloakDeploymentBuilder.build(adapterConfig);
return new KeycloakSpringConfigResolverWrapper(facade -> build); return new KeycloakSpringConfigResolverWrapper(facade -> build);
} }