void prepare(ModuleManager moduleManager,
                 ApplicationConfiguration.ModuleConfiguration configuration,
                 ServiceLoader<ModuleProvider> moduleProviderLoader,
                 TerminalFriendlyTable bootingParameters)
        throws ProviderNotFoundException, ServiceNotProvidedException, ModuleConfigException, ModuleStartException {
        for (ModuleProvider provider : moduleProviderLoader) {
            if (!configuration.has(provider.name())) {
                continue;
            }

            if (provider.module().equals(getClass())) {
                if (loadedProvider == null) {
                    loadedProvider = provider;
                    loadedProvider.setManager(moduleManager);
                    loadedProvider.setModuleDefine(this);
                    loadedProvider.setBootingParameters(bootingParameters);
                } else {
                    throw new DuplicateProviderException(
                        this.name() + " module has one " + loadedProvider.name() + "[" + loadedProvider
                            .getClass()
                            .getName() + "] provider already, " + provider.name() + "[" + provider.getClass()
                                                                                                  .getName() + "] is defined as 2nd provider.");
                }
            }

        }

        if (loadedProvider == null) {
            throw new ProviderNotFoundException(this.name() + " module no provider found.");
        }

        LOGGER.info("Prepare the {} provider in {} module.", loadedProvider.name(), this.name());
        try {
            final ModuleProvider.ConfigCreator creator = loadedProvider.newConfigCreator();
            if (creator != null) {
                final Class typeOfConfig = creator.type();
                if (typeOfConfig != null) {
                    final ModuleConfig config = (ModuleConfig) typeOfConfig.getDeclaredConstructor().newInstance();
                    copyProperties(
                        config,
                        configuration.getProviderConfiguration(loadedProvider.name()), this.name(),
                        loadedProvider.name()
                    );
                    creator.onInitialized(config);
                }
            }
        } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException |
                 InstantiationException e) {
            throw new ModuleConfigException(this.name() + " module config transport to config bean failure.", e);
        }
        loadedProvider.prepare();
    }
Run the prepare stage for the module, including finding all potential providers, and asking them to prepare.

@param moduleManager of this module
@param configuration of this module
@throws ProviderNotFoundException when even don't find a single one providers.
oap-server/server-library/library-module/src/main/java/org/apache/skywalking/oap/server/library/module/ModuleDefine.java