When starting Quarkus 2.7.1 with dev services enabled for KeyCloak, you can specify quarkus.keycloak.devservices.realm-path=realm.json
in the application.properties
.
The documentation for this property just says:
The class or file system path to a Keycloak realm file which will be used to initialize Keycloak.
It does not clearly state relative to what base directory the path is being resolved.
There are example projects where the file is placed inside a config/
subdir. I tried this as well as in the project's root dir. Neither location seems to work, the file is ignored and Quarkus creates a realm with its default values instead.
Specifying an absolute path works just fine.