All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.config.InitClientControllerCmdLineRunner Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.config;

import org.bidib.wizard.client.common.boot.SwingCommandLineRunner;
import org.bidib.wizard.common.event.WizardApplicationReadyEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(10)
public class InitClientControllerCmdLineRunner implements SwingCommandLineRunner {

    private static final Logger LOGGER = LoggerFactory.getLogger(InitClientControllerCmdLineRunner.class);

    @Autowired
    private DebugConsoleControllerFactory debugConsoleControllerFactory;

    @Autowired
    private ApplicationContext context;

    @Override
    public void run(String... args) throws Exception {
        LOGGER.info("Run the InitClientControllerCmdLineRunner to create the DebugConsoleController.");
        debugConsoleControllerFactory.createController();

        LOGGER.info("Publish the WizardApplicationReadyEvent.");
        context.publishEvent(new WizardApplicationReadyEvent(this));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy