Embedded spring application vs standalone

We are working towards implementing Keycloak in our system, and we are using Spring for a lot of the other components. In addition to our Keycloak, we need an adapter to implement authorization (which currently resides in databases) and consolidate this across products.

We are looking for answers and pro/cons of choosing either to embed our adapter by using Keycloak as a pom dependency, or use the Keycloak as a standalone application in our cluster. Is there a clear guideline on what we should strive towards, or is it a case by case evaluation? Please point us in the right direction as we are still getting to know Keycloak.