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

net.rgielen.fxweaver.spring.SpringFxContextLoader Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package net.rgielen.fxweaver.spring;

import net.rgielen.fxweaver.core.FxContextLoader;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.function.Supplier;

/**
 * SpringFxContextLoader.
 *
 * @author Rene Gielen
 */
public class SpringFxContextLoader extends FxContextLoader {

    private final Supplier contextLoader;

    public SpringFxContextLoader(Supplier contextLoader) {
        this.contextLoader = contextLoader;
    }

    @Override
    public SpringFxWeaver start() {
        ConfigurableApplicationContext context = contextLoader.get();
        return context.getBean(SpringFxWeaver.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy