Is it necessary to have a keycloak.json file even if we have configured everything in application.properties for a spring boot application.
If you are using Spring Security Adapter, add bean KeycloakConfigResolver in your configuration file. It will use application.properties instead of WEB-INF/keycloack.json
@Bean
public KeycloakConfigResolver KeycloakConfigResolver() {
return new KeycloakSpringBootConfigResolver();
}
See: https://developers.redhat.com/blog/2017/05/25/easily-secure-your-spring-boot-applications-with-keycloak/ Creating a SecurityConfig class section
Assuming yours spring-boot application , if you are using keycloak-spring-boot-starter
spring-boot adapter, Then you have all your configurations in application.properties.
You can find examples here https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-springboot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With