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

xyz.erupt.core.module.EruptModuleInvoke Maven / Gradle / Ivy

There is a newer version: 1.12.17
Show newest version
package xyz.erupt.core.module;

import xyz.erupt.core.util.EruptSpringUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;

/**
 * @author YuePeng
 * date 2022/1/4 21:58
 */
public class EruptModuleInvoke {

    private static final List> ERUPT_MODULES = new ArrayList<>();

    public static void addEruptModule(Class eruptModule) {
        ERUPT_MODULES.add(eruptModule);
    }

    public static void invoke(Consumer consumer) {
        ERUPT_MODULES.forEach(it -> consumer.accept(EruptSpringUtil.getBean(it)));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy