Class EmbeddedKeycloakBootstrapConfiguration

    • Constructor Detail

      • EmbeddedKeycloakBootstrapConfiguration

        public EmbeddedKeycloakBootstrapConfiguration()
    • Method Detail

      • keycloakContainerFactory

        @Bean
        public KeycloakContainerFactory keycloakContainerFactory​(org.springframework.core.env.ConfigurableEnvironment environment,
                                                                 KeycloakProperties properties,
                                                                 org.springframework.core.io.ResourceLoader resourceLoader)
      • keycloakContainer

        @Bean(name="embeddedKeycloak",
              destroyMethod="stop")
        public KeycloakContainer keycloakContainer​(KeycloakContainerFactory factory)
        Creates and starts a KeycloakContainer if property embedded.keycloak.enabled evaluates to true. The configuration makes no difference if just vanilla Keycloak is on the classpath or any Spring adapter. The container will always be needed. Also registers a shutdown hook to stop the container on context shutdown.
        Parameters:
        factory - The KeycloakContainerFactory to use, injected by Spring, must not be null
        Returns:
        The created KeycloakContainer instance to be registered as bean