Q:

keycloak.json file in springboot application

Is it necessary to have a keycloak.json file even if we have configured everything in application.properties for a spring boot application. 

A:

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

A:

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

