net.rgielen.fxweaver.spring.SpringFxContextLoader Maven / Gradle / Ivy
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