package com.github.thomasdarimont.keycloak.embedded;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(exclude = LiquibaseAutoConfiguration.class)
@EnableConfigurationProperties(KeycloakProperties.class)
@ServletComponentScan
public class EmbeddedKeycloakServer {

    public static void main(String[] args) {
        SpringApplication.run(EmbeddedKeycloakServer.class, args);
    }

    @Bean
    ApplicationListener<ApplicationReadyEvent> onApplicationReadyEventListener(ServerProperties serverProperties, KeycloakProperties keycloakProperties) {

        return (evt) -> {

            Integer port = serverProperties.getPort();
            String keycloakContextPath = keycloakProperties.getServer().getContextPath();

            System.out.printf("Embedded Keycloak started: http://localhost:%d%s to use keycloak%n", port, keycloakContextPath);
        };
    }
}

@@ -47,16 +47,90 @@
 edded;%0A%0A
+import lombok.extern.jbosslog.JBossLog;%0Aimport lombok.extern.slf4j.Slf4j;%0A
 import o
@@ -164,32 +164,32 @@
 ingApplication;%0A
-
 import org.sprin
@@ -719,16 +719,26 @@
 .Bean;%0A%0A
+@JBossLog%0A
 @SpringB
@@ -1388,24 +1388,16 @@
     
-System.out.print
+log.info
 f(%22E
@@ -1422,16 +1422,27 @@
 tarted: 
+Browse to %3C
 http://l
@@ -1454,16 +1454,17 @@
 ost:%25d%25s
+%3E
  to use 

Fix startup message