I\'m using this example: https://github.com/foo4u/keycloak-spring-demo
I have keycloak.json file in my WEB-INF folder, but when I run my application, I
Even though that's a good and valid example, that dates from 2015. I believe it uses Keycloak 1.2.0 which is completely outdated. There are a set of examples with Spring here. Most of them up to date with the latest changes.
I suggest taking a look at these examples and read the docs as well.
If you are using keycloak adapter with spring boot 2 or spring boot 1.5, you have to mentioned below properties in application.properties or application.yaml file
keycloak.auth-server-url=http://localhost:8180/auth
keycloak.realm=abc
keycloak.resource=movie-app
keycloak.public-client=false
keycloak.principal-attribute=preferred_username
If it still gives the error, please post the error, i will share the code :)