Example usage for org.springframework.context.support AbstractApplicationContext getClassLoader

List of usage examples for org.springframework.context.support AbstractApplicationContext getClassLoader

Introduction

In this page you can find the example usage for org.springframework.context.support AbstractApplicationContext getClassLoader.

Prototype

@Override
@Nullable
public ClassLoader getClassLoader() 

Source Link

Document

Return the ClassLoader to load class path resources with.

Usage

From source file:io.gravitee.gateway.handlers.api.ApiContextHandlerFactory.java

@Override
public ReactorHandler create(Api api) {
    if (api.isEnabled()) {
        AbstractApplicationContext internalApplicationContext = createApplicationContext(api);
        ApiReactorHandler handler = internalApplicationContext.getBean(ApiReactorHandler.class);
        handler.setClassLoader(internalApplicationContext.getClassLoader());
        return handler;
    } else {/*w w  w  .j ava  2 s  .c  om*/
        logger.warn("Api is disabled !");
        return null;
    }
}